Skip to content

Commit

Permalink
fix: tinymce using innerHTML instead of getContent (#16373)
Browse files Browse the repository at this point in the history
  • Loading branch information
hadl committed Dec 20, 2023
1 parent bde429c commit 28c2112
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bundles/TinymceBundle/public/js/editor.js
Expand Up @@ -106,7 +106,7 @@ pimcore.bundle.tinymce.editor = Class.create({
document.dispatchEvent(new CustomEvent(pimcore.events.changeWysiwyg, {
detail: {
e: eChange,
data: tinymce.activeEditor.contentAreaContainer.innerHTML,
data: tinymce.activeEditor.getContent(),
context: e.detail.context
}
}));
Expand All @@ -115,7 +115,7 @@ pimcore.bundle.tinymce.editor = Class.create({
document.dispatchEvent(new CustomEvent(pimcore.events.changeWysiwyg, {
detail: {
e: eChange,
data: tinymce.activeEditor.contentAreaContainer.innerHTML,
data: tinymce.activeEditor.getContent(),
context: e.detail.context
}
}));
Expand Down
2 changes: 1 addition & 1 deletion doc/03_Documents/01_Editables/40_WYSIWYG.md
Expand Up @@ -19,7 +19,7 @@ The Editor als needs to dispatch the `pimcore.events.changeWysiwyg` to set the v
document.dispatchEvent(new CustomEvent(pimcore.events.changeWysiwyg, {
detail: {
e: eChange,
data: tinymce.activeEditor.contentAreaContainer.innerHTML, //text of the editor-field
data: tinymce.activeEditor.getContent(), //text of the editor-field
context: e.detail.context //the context in which the editor is registered (object, document ...)
}
}));
Expand Down

0 comments on commit 28c2112

Please sign in to comment.