Skip to content

Commit

Permalink
fix: window.tinymce.editors[] is not forward compatible with later ve…
Browse files Browse the repository at this point in the history
…rsions of TinyMCE. Use the get() method instead to retrieve the Editor instance
  • Loading branch information
lucasnetau committed Aug 24, 2023
1 parent 4583b88 commit 255ed88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ export default class Helpers {
}
} else if (fieldData.subtype === 'tinymce' && window.tinymce) {
const id = `${fieldData.name}-preview`
if (window.tinymce.editors[id]) {
const editor = window.tinymce.editors[id]
const editor = window.tinymce.get(id)
if (editor) {
fieldData.value = editor.getContent()
}
}
Expand Down

0 comments on commit 255ed88

Please sign in to comment.