Link
Link is a node extension that allows you to add a horizontal rule to your editor.
- Based on TipTap's Link extension. @tiptap/extension-link
Usage
tsx
import { RichTextProvider } from 'reactjs-tiptap-editor'
// Base Kit
import { Document } from '@tiptap/extension-document'
import { Text } from '@tiptap/extension-text'
import { Paragraph } from '@tiptap/extension-paragraph'
import { Dropcursor, Gapcursor, Placeholder, TrailingNode } from '@tiptap/extensions'
import { HardBreak } from '@tiptap/extension-hard-break'
import { TextStyle } from '@tiptap/extension-text-style';
import { ListItem } from '@tiptap/extension-list';
// Extension
import { Link, RichTextLink } from 'reactjs-tiptap-editor/link';
// ... other extensions
// Import CSS
import 'reactjs-tiptap-editor/style.css';
const extensions = [
// Base Extensions
Document,
Text,
Dropcursor,
Gapcursor,
HardBreak,
Paragraph,
TrailingNode,
ListItem,
TextStyle,
Placeholder.configure({
placeholder: 'Press \'/\' for commands',
})
...
// Import Extensions Here
Link
];
const RichTextToolbar = () => {
return (
<div className="flex items-center gap-2 flex-wrap border-b border-solid">
<RichTextLink /> {}
</div>
)
}
const App = () => {
const editor = useEditor({
textDirection: 'auto', // global text direction
extensions,
});
return (
<RichTextProvider
editor={editor}
>
<RichTextToolbar />
<EditorContent
editor={editor}
/>
</RichTextProvider>
);
};Source
Contributors
Changelog
v1.0.0 on 12/7/2025c67ed - fix: conflict51948 - feat: refactor code, dynamic bubble, toolbar, fix errorv0.4.0 on 12/4/20256a3a7 - feat: migrate tiptap v2 to v3v0.3.27 on 10/9/2025d0bf5 - feat(link): make user experience of link editing betterv0.3.13 on 7/25/2025b6f7e - fix(link): resolve issues with HTMLAttributes and bubble popup update - Fixed the problem that the HTMLAttributes configuration of the link component does not take effect. - Fixed the problem that when changing the link bubble pop-up window display, switching to other links, the bubble pop-up window data is not updated.v0.3.11 on 6/27/20250f1cc - fix: fix bug not fill the text link when edit link
Hung Hoang
Condor Hero