Closed adiux closed 3 years ago
I believe we should implement the RTE only in the Mautic Grapesjs plugin. So that there is room for different RTEs to be used in different plugins.
Like this, we don't have the CKE dependency in the preset as well. And Mautic is already loading it.
For those not familiar with acronyms: RTE: Rich Text Editor
I agree that it should be possible if someone wanted to, to use a different editor in the GrapesJS builder. I would like if we shipped with CK Editor as standard given that we are using it across the rest of the product.
For info: you should be able to run Mautic.ConvertFieldToCkeditor(textarea, {});
(we leveraged that in https://github.com/mautic/grapesjs-preset-mautic/pull/17/files as well) to convert a field into CKEditor. Not sure how it was implemented in the past in the GrapesJS builder.
Unrelated to this issue, but for the future it might be better if we rework that function into something like Mautic.Editors.Ckeditor.ConvertField(textarea, {})
and Mautic.Editors.Default.ConvertField(textarea, {})
, to really make those editors more swappable, and allow users to set a default editor they want to use in Mautic.
I just implemented RTE (again), and we still have the same problems as I had last time. Eg. editing the text on a button in MJML mode.
Looking into it
this fixes the issue to edit buttons: https://github.com/artf/grapesjs/issues/1338
Comments on closed issues are hard for our team to see. If this issue is continuing with the lastest stable version of Mautic, please open a new issue that references this one.
The refactoring PR (https://github.com/mautic/mautic/pull/10114) removed the legacy Froala editor. Currently, only the default RTE editor from Grapesjs is available.
Once the refactoring is done, and all other UI bugs are fixed, we can then add CKE (or any other RTE).
Related issue: https://github.com/mautic/mautic/issues/10004