Skip to main content

nodePasteRule

@blockslides/core


@blockslides/core / nodePasteRule

Function: nodePasteRule()

nodePasteRule(config): PasteRule

Defined in: blockslides/packages/core/src/pasteRules/nodePasteRule.ts:13

Build an paste rule that adds a node when the matched text is pasted into it.

Parameters

config

find

PasteRuleFinder

type

NodeType

getAttributes?

false | Record<string, any> | (match, event) => Record<string, any> | null

getContent?

false | JSONContent[] | (attrs) => JSONContent[] | null

Returns

PasteRule

See

https://tiptap.dev/docs/editor/api/paste-rules