You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm encountering some issues with the TinyMCE plugin.
I'm using Ajax to submit the form, but in this case, the underlying textarea is never updated. Additionally, I created a tinymce.yaml file in the packages folder, but the configurations there seem to be completely ignored.
How can I update the plugin configuration to ensure it's applied properly?
How can I modify the TinyMCE JavaScript initialization to customize its behavior, such as ensuring the content is saved to the textarea on change? For example, I want to do something like this:
tinymce.init({
setup: function(editor) {
editor.on('change', function() {
editor.save(); // This ensures the content of TinyMCE is saved to the textarea
});
},
});
The text was updated successfully, but these errors were encountered:
For the tinymce.yaml config file, I'll quote what I just replied in #16 :
I have two suggestions here.
First one would be to try switching to emileperron/tinymce-bundle - it is a fork of this bundle with some bugfixes and improvements (for context, I am the original author of this here bundle as well, but left the organisation and it is now not really being maintained as an open-source project anymore).
Second thing, which might seem obvious but could be the issue if you only recently created the tinymce.yaml config file: try clearing your cache with a good old bin/console cache:clear.
For the other issue regarding data persistence, you should be able to trigger a save of every TinyMCE instance on the page by calling tinymce.triggerSave(), at which point the textarea should be updated. See TinyMCE's docs on triggersave.
Alternatively, If you just want to retrieve the value in Javascript, you can get the value property on the <tinymce-editor> element at any time, without needing to trigger a save first. Ex.:
Hi, I'm encountering some issues with the TinyMCE plugin.
I'm using Ajax to submit the form, but in this case, the underlying textarea is never updated. Additionally, I created a tinymce.yaml file in the packages folder, but the configurations there seem to be completely ignored.
How can I update the plugin configuration to ensure it's applied properly?
How can I modify the TinyMCE JavaScript initialization to customize its behavior, such as ensuring the content is saved to the textarea on change? For example, I want to do something like this:
The text was updated successfully, but these errors were encountered: