@editorcn/editor
@editorcn/block-editor
@editorcn/extensions
@editorcn/static-renderer
@editorcn/editor ships a custom Link extension that extends @tiptap/extension-link.
Features
- All standard link functionality
Mod-kkeyboard shortcut to open the link editor- Proper link editing via popover UI
Usage
Import the Link extension and add it to your Tiptap extensions:
import { Link } from "@editorcn/editor";
const editor = useEditor({
extensions: [
StarterKit,
Link, // replaces @tiptap/extension-link
],
});Link Control
Use RichTextEditor.Link in your toolbar to add the link popover button:
<RichTextEditor.ControlsGroup>
<RichTextEditor.Link />
<RichTextEditor.Unlink />
</RichTextEditor.ControlsGroup>The link button opens a popover where users can enter or edit a URL. The link is applied to the selected text.