Extend nodePasteRule find type to most generic PasteRuleFinder (#3759)

This commit is contained in:
Jie 2023-02-19 00:48:45 +09:00 committed by GitHub
parent d8967a7d63
commit a81019a6b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
import { NodeType } from '@tiptap/pm/model'
import { PasteRule } from '../PasteRule'
import { PasteRule, PasteRuleFinder } from '../PasteRule'
import { ExtendedRegExpMatchArray } from '../types'
import { callOrReturn } from '../utilities'
@ -9,7 +9,7 @@ import { callOrReturn } from '../utilities'
* matched text is pasted into it.
*/
export function nodePasteRule(config: {
find: RegExp
find: PasteRuleFinder
type: NodeType
getAttributes?:
| Record<string, any>