Skip to main content

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

OptionTypeDefaultDescription
allow_html_in_named_anchorbooleanfalseWhen true, allows the anchor to wrap selected HTML content instead of inserting an empty anchor element.

Commands

CommandDescription
editor42AnchorOpens the anchor dialog to insert or edit a named anchor at the current selection.

Toolbar buttons

NameTypeDescription
anchorToggle buttonActive when the cursor is inside a named anchor.
NameDescription
anchorOpens the anchor dialog.