UNPKG

@tiptap/core

Version:

headless rich text editor

14 lines (13 loc) 569 B
import { MarkType } from '@tiptap/pm/model'; import { PasteRule, PasteRuleFinder } from '../PasteRule.js'; import { ExtendedRegExpMatchArray } from '../types.js'; /** * Build an paste rule that adds a mark when the * matched text is pasted into it. * @see https://tiptap.dev/guide/custom-extensions/#paste-rules */ export declare function markPasteRule(config: { find: PasteRuleFinder; type: MarkType; getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record<string, any>) | false | null; }): PasteRule;