Link extension for tiptap rich text editor providing automatic link detection, paste handling, click behavior, and XSS protection.
88
Build a rich text editor that automatically detects and creates links from typed URLs, but intelligently skips URLs that appear within inline code formatting.
Your editor must:
Enable Automatic Link Detection: Configure the editor to automatically convert URLs to clickable links when users type a URL followed by whitespace (space, tab, or newline).
Support Inline Code Marks: The editor must support inline code formatting (code marks) for technical text.
Respect Code Boundaries: The autolink feature must check whether text is within a code mark before creating links. URLs inside inline code should remain as plain text, not be converted to links.
Create a test file named editor.test.ts with the following tests:
// Create editor instance
const editor = createEditor({
autolink: true,
enableCodeMarks: true
});
// User types: "Check out https://tiptap.dev "
// Result: "Check out <a href="https://tiptap.dev">https://tiptap.dev</a>"
// User types: "Use `https://example.com` in code"
// Result: "Use <code>https://example.com</code> in code" (no link created)Provides link functionality with automatic link detection and code mark awareness.
Install with Tessl CLI
npx tessl i tessl/npm-tiptap--extension-linkdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10