tessl install tessl/npm-tiptap--extension-typography@3.4.0Typography extension for Tiptap that automatically converts common text input patterns into proper typographic characters.
Agent Success
Agent success rate when using this tile
73%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.86x
Baseline
Agent success rate without this tile
85%
Build a simple rich text editor that supports basic text formatting: bold, italic, strikethrough, code, and underline.
Initialize a rich text editor with support for:
The editor should start with some default content and allow programmatic text selection.
Your implementation should support:
When text is selected and a format is toggled:
@generates
/**
* Creates and returns a rich text editor instance with all formatting extensions
* The editor should be initialized with basic content: "<p>Hello world</p>"
*/
export function createEditor(): any;
/**
* Programmatically selects text in the editor
* @param editor - The editor instance
* @param from - Start position
* @param to - End position
*/
export function selectText(editor: any, from: number, to: number): void;
/**
* Toggles bold formatting on the current selection
*/
export function toggleBold(editor: any): void;
/**
* Toggles italic formatting on the current selection
*/
export function toggleItalic(editor: any): void;
/**
* Toggles strikethrough formatting on the current selection
*/
export function toggleStrike(editor: any): void;
/**
* Toggles inline code formatting on the current selection
*/
export function toggleCode(editor: any): void;
/**
* Toggles underline formatting on the current selection
*/
export function toggleUnderline(editor: any): void;
/**
* Checks if a specific format is active at the current cursor/selection
* @param formatName - One of: 'bold', 'italic', 'strike', 'code', 'underline'
*/
export function isFormatActive(editor: any, formatName: string): boolean;
/**
* Exports the current editor content as HTML
*/
export function getHTML(editor: any): string;Provides core rich text editing functionality.
Provides essential editor extensions including document structure.