Link
Plugin alias: link
editor42.init({
plugins: 'link'
});
Manages the creation, editing, and removal of hyperlinks. Provides a full dialog for configuring URL, text, title, target, rel, and class attributes, plus an optional inline quick-link context form. Supports predefined link lists, automatic protocol prefixing, and navigation to links via Ctrl/Cmd+click.
Options
| Option | Type | Default | Description |
|---|---|---|---|
link_assume_external_targets | boolean/string | false | Whether non-protocol URLs are assumed external; true = warn, 'http'/'https' = auto-prefix. |
link_context_toolbar | boolean | false | Show inline context toolbar on links. |
link_list | string/object[]/function | — | Predefined links for dropdown. |
link_default_target | string | — | Default target attribute. |
link_default_protocol | string | 'https' | Default protocol. |
link_target_list | boolean/object[] | true | Target options; false hides the field. |
link_rel_list | object[] | [] | Rel values. |
link_class_list | object[] | [] | CSS classes. |
link_title | boolean | true | Show title field. |
allow_unsafe_link_target | boolean | false | When false, adds rel="noopener" for _blank targets. |
link_quicklink | boolean | false | Open quick context form instead of full dialog. |
Commands
| Command | Description |
|---|---|
editor42Link | Opens link dialog (or quick-link form if configured). |
Toolbar buttons
| Name | Type | Description |
|---|---|---|
link | Toggle button | Active when cursor is in a link. |
openlink | Button | Open link in new tab. |
unlink | Button | Remove link. |
Menu items
| Name | Description |
|---|---|
link | Insert/edit link. |
openlink | Open link. |
unlink | Remove link. |
Also registers a context menu and quicklink context form.
Keyboard shortcuts
Ctrl+K(Windows/Linux) /Cmd+K(macOS) — open link dialog.