Headless rich text editor built on ProseMirror with extensible architecture for building custom editors
94
Build a content review system where users can view and approve submitted articles. The system should allow reviewers to switch between view-only mode and edit mode, with the ability to make corrections before approval.
Create an editor instance that displays article content. The editor should support basic text formatting including paragraphs, bold text, and italic text.
The system must support two distinct modes:
Implement a toggle mechanism that switches between these two modes. When switching modes, the editor should immediately reflect the change in editability.
Display the current mode status to users. Show "View Mode" when the editor is read-only and "Edit Mode" when editing is enabled.
@generates
/**
* Creates a content review system with toggleable edit mode
* @param element - The DOM element to mount the editor
* @param content - The initial HTML content to display
* @returns An object with methods to control the review system
*/
export function createReviewSystem(
element: HTMLElement,
content: string
): {
toggleMode: () => void;
getCurrentMode: () => 'view' | 'edit';
destroy: () => void;
};Provides the rich text editor framework with editable state control.
Provides basic editor extensions for text formatting.
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