This is related to this issue in core: backdrop/backdrop-issues#7158
Basically, when the form is saved, the editor is removed and the user briefly sees a textarea with plain HTML instead of the editor.
This is easily fixed with a simple if statement, checking to see if the form is submitting or not. If it is, do not remove the editor.
Unfortunately (unless there is another way to handle this), this requires a single line of code added to core's filter.js file, as seen in this core issue and PR: backdrop/backdrop-issues#7149
Once that is in place (or if there is another technique for detecting the form is being submitted which can be used), then THIS bug would be easy to fix with the following code for tinymce-integration.js, on line 143:
detach: function (element, format, trigger) {
if (trigger === 'serialize') {
tinymce.triggerSave();
return;
}
if (Backdrop.settings.formIsSubmitting != true) {
let idSelector = '#' + element.id;
tinymce.remove(idSelector);
}
}
If the core PR gets merged, I will immediately create a PR for TinyMCE which adds this little bit of code. I wanted to create this issue in the meantime, to document the situation.
This is related to this issue in core: backdrop/backdrop-issues#7158
Basically, when the form is saved, the editor is removed and the user briefly sees a textarea with plain HTML instead of the editor.
This is easily fixed with a simple
ifstatement, checking to see if the form is submitting or not. If it is, do not remove the editor.Unfortunately (unless there is another way to handle this), this requires a single line of code added to core's filter.js file, as seen in this core issue and PR: backdrop/backdrop-issues#7149
Once that is in place (or if there is another technique for detecting the form is being submitted which can be used), then THIS bug would be easy to fix with the following code for tinymce-integration.js, on line 143:
If the core PR gets merged, I will immediately create a PR for TinyMCE which adds this little bit of code. I wanted to create this issue in the meantime, to document the situation.