UNPKG

edix

Version:

An experimental, type-safe, framework agnostic and small (5kB+) contenteditable state manager.

7 lines (6 loc) 409 B
import type { DocNode, InferInlineNode, TextNode } from "../../doc/types.js"; import type { PasteHook } from "./types.js"; /** * An extension to handle pasting / dropping from HTML. */ export declare const htmlPaste: <T extends DocNode>(serializeText: (t: string) => Extract<InferInlineNode<T>, TextNode>, serializers?: ((node: HTMLElement) => Exclude<InferInlineNode<T>, TextNode> | void)[]) => PasteHook;