UNPKG

@jager-ai/holy-editor

Version:

Rich text editor with Bible verse slash commands and PWA keyboard tracking, extracted from Holy Habit project

66 lines 1.77 kB
/** * Text Formatter * * Text formatting engine for rich text editing * Extracted from Holy Habit holy-editor-pro.js */ import { FormatAction, FormatState, EditorSelection } from '../types/Editor'; export declare class TextFormatter { private editorId; constructor(editorId?: string); /** * Get current selection information */ getCurrentSelection(): EditorSelection | null; /** * Toggle bold formatting */ toggleBold(): void; /** * Toggle underline formatting */ toggleUnderline(): void; /** * Toggle heading1 formatting */ toggleHeading1(): void; /** * Toggle quote formatting */ toggleQuote(): void; /** * Apply text color */ applyTextColor(color: string): void; /** * Toggle any formatting style */ toggleStyle(action: FormatAction): void; /** * Check current format state */ getFormatState(): FormatState; private isCurrentlyBold; private isCurrentlyUnderlined; private isCurrentlyHeading; private isCurrentlyQuote; private isCurrentlyTextColor; private hasFormatTag; private applyBoldToSelection; private applyUnderlineToSelection; private applyHeading1ToSelection; private applyQuoteToSelection; private applyColorToSelection; private removeBoldFromSelection; private removeUnderlineFromSelection; private removeHeadingFromSelection; private removeQuoteFromSelection; private removeFormatFromSelection; private selectNode; private updateSelection; private extractNodeContents; private restoreSelectionFromFragment; private createEmptyInlineQuote; private setNextInputStyle; } //# sourceMappingURL=TextFormatter.d.ts.map