mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-07 09:25:29 +08:00
fix: check for invalid content in insertContentAt
command
This commit is contained in:
parent
170ec4be5b
commit
e09fd93e59
@ -59,6 +59,9 @@ export const insertContentAt: RawCommands['insertContentAt'] = (position, value,
|
|||||||
: [content]
|
: [content]
|
||||||
|
|
||||||
nodes.forEach(node => {
|
nodes.forEach(node => {
|
||||||
|
// check if added node is valid
|
||||||
|
node.check()
|
||||||
|
|
||||||
isOnlyBlockContent = isOnlyBlockContent
|
isOnlyBlockContent = isOnlyBlockContent
|
||||||
? node.isBlock
|
? node.isBlock
|
||||||
: false
|
: false
|
||||||
|
Loading…
Reference in New Issue
Block a user