UNPKG

edix

Version:

An experimental, framework agnostic, small (~3kB) contenteditable state manager.

5 lines (4 loc) 369 B
import { type DocFragment, type SelectionSnapshot, type Writeable } from "../types"; export type EditableCommand<T extends unknown[]> = (doc: Writeable<DocFragment>, selection: Writeable<SelectionSnapshot>, ...args: T) => void; export declare const Delete: EditableCommand<[range?: SelectionSnapshot]>; export declare const InsertText: EditableCommand<[text: string]>;