Anchor
Plugin alias: anchor
editor42.init({
plugins: 'anchor'
});
Allows inserting and editing named anchor elements (bookmark links) in the editor content. Opens a dialog to set an anchor ID, validates it against HTML4 ID rules, and supports both empty anchors displayed as inline markers and anchors wrapping selected content.
Options
| Option | Type | Default | Description |
|---|---|---|---|
allow_html_in_named_anchor | boolean | false | When true, allows the anchor to wrap selected HTML content instead of inserting an empty anchor element. |
Commands
| Command | Description |
|---|---|
editor42Anchor | Opens the anchor dialog to insert or edit a named anchor at the current selection. |
Toolbar buttons
| Name | Type | Description |
|---|---|---|
anchor | Toggle button | Active when the cursor is inside a named anchor. |
Menu items
| Name | Description |
|---|---|
anchor | Opens the anchor dialog. |