Type: Boolean
, String
Default: false
When set it to _blank
, all inserted links will get a target attribute and be able to open in the new tab.
Redactor('#entry', {
link: {
target: '_blank'
}
});
Type: Boolean
Default: false
When set it to true
, all links inside of Redactor will get a nofollow attribute. This attribute restricts search engines indexing for these links.
Redactor('#entry', {
link: {
nofollow: true
}
});
Type: Number
Default: 30
This setting allows to automatically truncate link text.
Redactor('#entry', {
link: {
size: 60
}
});
Type: Function
Default: false
This setting allows you to call a custom modal when creating a link.
Redactor('#entry', {
link: {
create: function(app, text) {
console.log('create link', app, text);
... call your function with your modal ...
}
}
});
Type: Function
Default: false
This setting allows you to call a custom modal when editing a link.
Redactor('#entry', {
link: {
edit: function(app, $el, data) {
console.log('edit link', $el, data);
... call your function with your modal ...
}
}
});