/** * Task / to-do list feature. * * Each
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