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 document formatting system that automatically converts common text input patterns into proper typographic characters as users type.
Your system should:
Create a file formatter.ts that exports:
createEditor(config): A function that creates and returns an editor instance configured with typography replacementsCreate a test file formatter.test.ts with the following tests:
Input: Initialize editor with empty content, insert the text "Hello--World"
Expected Output: The editor's HTML content should contain "Hello—World" (with em dash character)
Input: Initialize editor with empty content, insert the text "Wait..."
Expected Output: The editor's HTML content should contain "Wait…" (with ellipsis character)
Input: Initialize editor with empty content, insert the text '"Hello World"'
Expected Output: The editor's HTML content should contain ""Hello World"" (with smart quotes)
Input: Initialize editor with em dash enabled but ellipsis disabled, insert "Test--one...two"
Expected Output: The editor should convert the double hyphens to em dash (—) but leave the three periods unchanged
Provides the core editor functionality and extension system.
Provides automatic typography replacements for common text input patterns.
Provides the document node for the editor schema.
Provides the text node for the editor schema.
Provides the paragraph node for the editor schema.