UNPKG

medium-proeditor

Version:

A powerful & customizable Medium-style rich text editor

15 lines 780 B
import type { NodeType, Node as ProseMirrorNode } from 'prosemirror-model'; import { PasteRule, type PasteRuleFinder } from '../PasteRule'; import type { ExtendedRegExpMatchArray } from '../types'; /** * Build an paste rule that adds a node when the * matched text is pasted into it. * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules */ export declare function nodePasteRule(config: { find: PasteRuleFinder; type: NodeType; getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record<string, any>) | false | null; getContent?: ProseMirrorNode | ((attrs: Record<string, any>) => ProseMirrorNode) | false | null; }): PasteRule; //# sourceMappingURL=nodePasteRule.d.ts.map