/** * Task / to-do list feature. * * Each
  • is the single editable surface. The checkbox is a custom * followed by a plain * text node — no nested contenteditable spans, no native inputs. * * DOM structure (inside editor): * * * getContent() output (clean HTML — span stripped, data-checked preserved): * * * setContent() / restoreFromHTML: bare
  • → span + text node. * Also migrates old formats (span+text-span, native input) automatically. */ export declare class TaskListFeature { private editorArea; constructor(editorArea: HTMLElement); /** Insert a new task list at the current cursor position */ insertTaskList(): void; /** Build a single task list item: custom checkbox span + text node */ buildTaskItem(checked: boolean, text: string): HTMLLIElement; /** * Handle Enter and Backspace inside task list items. * - Enter on non-empty item → split text at cursor into new task item * - Enter on empty item → exit task list, insert

    after * - Backspace at text start → convert item to

    , remove from list */ handleKeydown(e: KeyboardEvent): void; /** * Rebuild task list items from clean getContent() HTML (bare li[data-checked]). * Also migrates old formats (span+text-span, native input) automatically. */ static restoreFromHTML(container: HTMLElement): void; private static buildCheckboxSpan; /** Return the text node that follows the checkbox span (the canonical content node). */ private getTextNode; /** * If the browser allowed text/nodes to slip before the checkbox span * (e.g. cursor was at li[offset=0] and user typed), move them to after the span. * Called at the start of every keydown handler to guarantee structure before splits. */ private normalizeTaskItem; /** * Intercept click on the checkbox span: toggle checked state, * sync data-checked / aria-checked / .checked class. */ private bindClickHandler; } /** * Serialize task list items for getContent() output. * Removes the checkbox span; text node stays → clean

  • text
  • . */ export declare function serializeTaskLists(container: HTMLElement): void; //# sourceMappingURL=tasklist.d.ts.map