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-7/

Text Selection Manager

A utility for managing text selections in a rich text editor. The module should provide functionality to programmatically control text selection, cursor positioning, and focus state.

Capabilities

Programmatic Text Selection

  • When given a document with content "Hello World", calling selectRange with start position 0 and end position 5 selects "Hello" @test
  • When the document contains "Hello World", calling selectPosition with position 6 moves the cursor to position 6 (before "World") @test
  • When the document has content "Line 1\nLine 2", calling selectAll selects the entire document content @test

Focus Management

  • When the editor is not focused, calling focusEditor brings focus to the editor @test
  • When the editor is focused, calling blurEditor removes focus from the editor @test

Implementation

@generates

API

import { Editor } from '@tiptap/core';

/**
 * Selects a range of text in the editor
 * @param editor - The Tiptap editor instance
 * @param from - Start position of the selection
 * @param to - End position of the selection
 */
export function selectRange(editor: Editor, from: number, to: number): void;

/**
 * Sets the cursor to a specific position
 * @param editor - The Tiptap editor instance
 * @param position - The position where the cursor should be placed
 */
export function selectPosition(editor: Editor, position: number): void;

/**
 * Selects all content in the editor
 * @param editor - The Tiptap editor instance
 */
export function selectAll(editor: Editor): void;

/**
 * Brings focus to the editor
 * @param editor - The Tiptap editor instance
 */
export function focusEditor(editor: Editor): void;

/**
 * Removes focus from the editor
 * @param editor - The Tiptap editor instance
 */
export function blurEditor(editor: Editor): void;

Dependencies { .dependencies }

@tiptap/core { .dependency }

Provides the core editor functionality and selection management APIs.

@satisfied-by

Version

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