nuxt · GitHub

Commit c37d6f7

committed

fix(Editor): set contentType when updating value

Resolves #5709

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/runtime/components

Lines changed: 1 addition & 1 deletion

Original file line numberDiff line numberDiff line change

@@ -208,7 +208,7 @@ watch(() => props.modelValue, (newVal) => {

208208

const currentPos = currentSelection.from

209209
210210

// Set the new content

211-

editor.value.commands.setContent(newVal)

211+

editor.value.commands.setContent(newVal, { contentType: contentType.value })

212212
213213

// Restore cursor position if the position is still valid in the new content

214214

const newDoc = editor.value.state.doc

0 commit comments

Comments

 (0)

Read the original on github.com ↗