-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
This comes from an issue using Redactor. There was a small change in Redactor 3.1.5 where it only defines MODx.loadRTE if Redactor is specifically requested/initialised. The purpose of that change was to allow the use of a different editor (like TinyMCE) globally, while using Redactor's ability to be enabled on other specific elements (like specific ContentBlocks fields).
This surfaced one/two issues with the way Formalicious initialises editors.
- Formalicious does not check if MODX.loadRTE is defined before calling it for the email content field. This means the Formalicious component breaks when the editor isn't loaded for whatever reason
Error trace:
Suggestion:
if (MODx.config.which_editor === 'TinyMCE RTE') {
config.skin = MODx.config['tinymcerte.skin'];
new TinyMCERTE.Tiny({
allowDrop : true
}, config);
- } else {
- MODx.loadRTE(id, config);
- }
+ } else if (MODx.loadRTE) {
+ MODx.loadRTE(id, config);
+ }
- Formalicious doesn't seem to run the
OnRichTextEditorInitevent to initialise editors in a universal way. While Redactor loads itself globally, it only sets MODx.loadRTE ifOnRichTextEditorInitis called.
(For more details on this, see https://docs.modmore.com/en/Redactor/v3.x/Usage/Third_Party_Extras.html)
Metadata
Metadata
Assignees
Labels
No labels