Update packages/core/src/commands/insertContentAt.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Arnau Gómez Farell 2025-06-04 13:11:21 +02:00 committed by GitHub
parent 42f719468b
commit c096d4fef7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,7 +91,7 @@ export const insertContentAt: RawCommands['insertContentAt'] = (position, value,
// If `emitContentError` is enabled, we want to check the content for errors
// but ignore them (do not remove the invalid content from the document)
if (!options.errorOnInvalidContent && editor.options.enableContentCheck && editor.options.emitContentError) {
if (!options.errorOnInvalidContent && !editor.options.enableContentCheck && editor.options.emitContentError) {
try {
createNodeFromContent(value, editor.schema, {
parseOptions,