CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-tiptap--extension-typography

tessl install tessl/npm-tiptap--extension-typography@3.4.0

Typography 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%

task.mdevals/scenario-10/

Document Content Manager

A utility that manages rich text document content with support for loading, replacing, and transforming document data.

Capabilities

Load document from JSON

  • When provided with valid JSON document data, it loads the content into the editor @test
  • When provided with an empty JSON document, it loads an empty editor state @test

Replace entire document

  • When replacing content with new HTML, it updates the entire document @test
  • When replacing with plain text, it converts the text to a proper document structure @test

Clear document content

  • When clearing the document, it removes all content and resets to an empty state @test

Export document content

  • When exporting to JSON, it returns the document in JSON format @test
  • When exporting to HTML, it returns the document as HTML string @test

Implementation

@generates

API

/**
 * Creates a document content manager
 */
export function createDocumentManager(): DocumentManager;

/**
 * Document manager interface for managing rich text content
 */
export interface DocumentManager {
  /**
   * Loads document content from JSON format
   * @param json - The JSON document data
   */
  loadFromJSON(json: any): void;

  /**
   * Replaces the entire document with new content
   * @param content - The new content (HTML string, JSON, or plain text)
   * @param format - The format of the content ('html', 'json', or 'text')
   */
  replaceContent(content: string | any, format: 'html' | 'json' | 'text'): void;

  /**
   * Clears all content from the document
   */
  clearDocument(): void;

  /**
   * Exports the document to JSON format
   * @returns The document as JSON
   */
  exportToJSON(): any;

  /**
   * Exports the document to HTML format
   * @returns The document as HTML string
   */
  exportToHTML(): string;

  /**
   * Destroys the document manager and cleans up resources
   */
  destroy(): void;
}

Dependencies { .dependencies }

@tiptap/core { .dependency }

Provides rich text editor functionality for managing document content.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@tiptap/extension-typography@3.4.x
tile.json