Skip to main content

Quick start

Use BubbleMenu.LinkDefault to add an inline link editing toolbar.

How it works

When you click on a link in the editor, the link bubble menu appears with:
  • Edit button: Opens an inline form to change the URL
  • Open button: Opens the link in a new tab
  • Unlink button: Removes the link, keeping the text
To add a new link, select text and press Cmd+K (or Ctrl+K on Windows/Linux).

Bubble menu

When combining the link bubble menu with BubbleMenu, use hideWhenActiveMarks to prevent the text bubble menu from appearing when a link is focused.
Without hideWhenActiveMarks, both menus will try to show at the same time when a link is selected. When using HTML strings as content, <a> tags are automatically parsed into the editor’s link model.
The link extension is included in StarterKit with openOnClick disabled by default. This means that clicking a link in edit mode focuses it rather than navigating away.

Examples

See link editing in action with a runnable example:

Link Editing

Inline link editing with Cmd+K support.