import { StandardSchemaV1 } from '@standard-schema/spec'; import { DocNode, Fragment, Selection } from './doc/types.js'; import { Operation } from './doc/operation.js'; import { Parser } from './dom/parser.js'; type EditorCommandOrPlugin = (editor: Editor, ...args: A) => void | undefined; type EditorQuery = (editor: Editor, ...args: A) => V; /** * Options of {@link createEditor}. */ export interface EditorOptions | void = void> { /** * Optional [Standard Schema](https://github.com/standard-schema/standard-schema) to validate unsafe edits. */ schema?: S; /** * Initial document. */ doc: T; /** * The state editable or not. */ readonly?: boolean; /** * TODO */ isBlock?: (node: HTMLElement) => boolean; /** * Keep the caret visible inside the mounted element after document * changes, behaving like a native `