CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-tiptap--core

Headless rich text editor built on ProseMirror with extensible architecture for building custom editors

94

1.00x
Overview
Eval results
Files

task.mdevals/scenario-8/

Text Formatter

A rich text formatting utility that applies multiple formatting operations to editor content using chained commands.

Capabilities

Sequential formatting operations

  • Applies bold formatting, then italic formatting, then sets text color to red for selected text @test
  • Clears existing content and inserts new formatted paragraph with alignment @test

Conditional operation execution

  • Checks if bold formatting can be applied before executing a chain of formatting commands @test
  • Validates that a formatting chain returns false when operations cannot be executed @test

Implementation

@generates

API

/**
 * Applies sequential formatting operations to selected text.
 *
 * @param editor - The editor instance to apply formatting to
 * @returns true if all operations succeed, false otherwise
 */
export function applySequentialFormatting(editor: any): boolean;

/**
 * Clears content and inserts a new formatted paragraph.
 *
 * @param editor - The editor instance
 * @param content - The text content to insert
 * @param alignment - Text alignment ('left', 'center', 'right')
 * @returns true if operations succeed, false otherwise
 */
export function clearAndInsertFormatted(editor: any, content: string, alignment: string): boolean;

/**
 * Checks if formatting can be applied, then applies if valid.
 *
 * @param editor - The editor instance
 * @returns true if validation passed and formatting applied, false otherwise
 */
export function applyWithValidation(editor: any): boolean;

/**
 * Validates that a formatting chain can be executed without applying it.
 *
 * @param editor - The editor instance
 * @returns true if the chain can be executed, false otherwise
 */
export function validateFormattingChain(editor: any): boolean;

Dependencies { .dependencies }

@tiptap/core { .dependency }

Provides rich text editor functionality with command chaining support.

Install with Tessl CLI

npx tessl i tessl/npm-tiptap--core

tile.json