Take a look at our new Article and Redactor X editors.

open #

Open the modal window to insert a link.

this.app.api('module.link.open');

or external call:

$R('#content', 'module.link.open');

insert #

Arguments
data Object

Insert the link at the caret with following data object:

var data = {
    target: false, // or true for '_blank'
    url: 'link url',
    text: 'link text'
};

Call method:

this.app.api('module.link.insert', data);

or external call:

$R('#content', 'module.link.insert', data);

update #

Arguments
data Object

Update all links in the selected content with following data object:

var data = {
    target: false, // or true for '_blank'
    url: 'link url',
    text: 'link text'
};

Call method:

this.app.api('module.link.update', data);

or external call:

$R('#content', 'module.link.update', data);

Unlink all links in the selected content of Redactor.

this.app.api('module.link.unlink');

or external call:

$R('#content', 'module.link.unlink');