HYPERLINK EDIT
Hyperlink-related commands executed via editor.execCommand.
Commands
command - deleteLink
Removes the link at the caret position.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('deleteLink');
command - insertLink
Attaches a link to the selected text. With only a caret (no selection), inserts the provided text or URL as a link.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
url | string | Link URL |
text | string | Text to insert |
title | string | Link description (title attribute) |
target | string | Target: _blank, _top, _parent, _self |
editor.execCommand('insertLink',
'http://www.synapeditor.com',
'Go to the Synap Editor homepage',
'Synap Editor homepage',
'_blank'
);
command - openLink
Opens the link at the caret position.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('openLink');
command - updateLink
Updates the link that matches the given id.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
id | string | Link ID |
url | string | Link URL |
text | string | New text |
title | string | Link description (title attribute) |
target | string | Target: _blank, _top, _parent, _self |
editor.execCommand('updateLink',
'se_287be74c-119f',
'http://www.synapeditor.com',
'Go to the Synap Editor homepage',
'Synap Editor homepage',
'_blank'
);