Link extension for tiptap rich text editor providing automatic link detection, paste handling, click behavior, and XSS protection.
88
Build a custom mark extension for a Tiptap-based rich text editor that applies highlighting with specific cursor and text continuation behaviors.
Create a Tiptap mark extension named "Highlight" that applies a yellow background color to selected text. The mark must have these specific behaviors:
The extension should provide a toggleHighlight command and render as a <mark> HTML element with yellow background styling.
@generates
import { Mark } from '@tiptap/core';
export interface HighlightOptions {
HTMLAttributes: Record<string, any>;
}
export const Highlight: Mark<HighlightOptions>;Provides the core Tiptap editor framework and Mark class for creating custom mark extensions.
Reference implementation demonstrating mark behavior controls including exitable, keepOnSplit, and inclusive properties.
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