Link

link.inserted #

Arguments
link Object link object

Triggered when the link is inserted to Redactor.

$R('#content', {
    callbacks: {
        link: {
            inserted: function(link)
            {
                // ...
            }
        }
    }
});

Listen to the message in a plugin:

(function($R)
{
    $R.add('plugin', 'myplugin', {
        init: function(app)
        {
            // define app
            this.app = app;
        },

        // messages
        onlink: {
            inserted: function(link)
            {
                // ...
            }
        }
    });
})(Redactor);

link.deleted #

Arguments
links Arrayarray of unlinked links

Listen to the message in a plugin:

(function($R)
{
    $R.add('plugin', 'myplugin', {
        init: function(app)
        {
            // define app
            this.app = app;
        },

        // messages
        onlink: {
            deleted: function(links)
            {
                // ...
            }
        }
    });
})(Redactor);