Headless rich text editor built on ProseMirror with extensible architecture for building custom editors
94
Build a simple rich text editor content type system that supports custom callout boxes and highlight marks with configurable colors.
Your implementation should provide:
A custom CalloutBox node that represents a styled callout/blockquote element with:
variant attribute that can be "info", "warning", or "success"A custom ColorHighlight mark that applies colored highlighting to text with:
color attribute that accepts any valid CSS color valueBoth the node and mark should be properly integrated as extensions and registered with an editor instance
@generates
import { Node, Mark, Editor } from '@tiptap/core';
/**
* Custom node extension for styled callout boxes.
* Supports three variants: info, warning, and success.
*/
export const CalloutBox: Node;
/**
* Custom mark extension for colored text highlighting.
* Supports any CSS color value.
*/
export const ColorHighlight: Mark;
/**
* Creates and returns a configured editor instance with the custom extensions.
* The editor is initialized in headless mode (no DOM element).
*/
export function createEditor(): Editor;Provides the rich text editor framework and extension system.
Install with Tessl CLI
npx tessl i tessl/npm-tiptap--coredocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10