-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CKEditor using grapesjs-mjml #68
Comments
Mjml works almost fine for me with ckeditor (i have some problems with some unicode characters inserted by ckeditor). |
@artf @IceCrystal0k CKEditor is still not working with grapesjs-mjml. When we perform any action from right panel (means change font color etc), then make changes from ckeditor, its not working. Issue is also reproducing on grapesjs-mjml demo. I need the solution for it. Please help. Thanks. |
yea, i can see that after you change something from the right side the CKeditor won't apply the changes anymore, probably it needs the content to be updated, i don't know. But i see no error in the console. What you can do for now is to disable the editing from the right side for the mj-text component and let only the ckeditor. |
I am facing the same issue. Any progress on this? |
We have resolved most of the crucial issues with the project so far (#92 and GrapesJS/grapesjs#1649). This one is left. When you apply styles to an editable component (text, button, etc.) with Style Manager, and then try to edit with CKEditor, it does not work. It also doesn't show any error in console (also not on the demo), which is not very helpful. I wanted to focus on this issue so we can collaborate and resolve it. Currently debugging as well and I will share a solution if I find it. |
I made it work. MJML works differently than the other plugins in that it regenerates the element html every time there is a style change. So as long as no styles are applied to a text element (for example), CKE is fine going back to edit mode and apply more changes. I noticed that the class When you double click a text component, it fires
enable is a function ran by the CKeditor grapesjs plugin which first initiates the ckeditor instance on the element, and with consequent edits it reuses the same instance, however, here is the problem. We cannot rely on the same instance of the ckeditor, if the component was regenerated.
Now the ckeditor will reinitialize whenever grapesjs regenerates the element. So this will solve the issue. However, this requires changing the ckeditor plugin and it should be possible to improved. We should understand really what causes ckeditor to not want to edit the newly generated element.
|
Released the new version https://github.com/artf/grapesjs-mjml/releases/tag/v0.0.31 |
@artf I am confused, v0.0.31 only addresses focus on text components, not the issue above when you change styles with style manager and then cke stops responding. Am I missing something? |
I tried to style the component and the RTE works as expected, maybe I miss something... |
@artf any word on this? |
@kickbk Have you worked out a work around? |
using this plugin https://github.com/yanfanvip/grapesjs-plugin-ckeditor/blob/master/src/index.js |
When I edit any text from side bar typgraphy or anythingelse, then I use the ckeditor operation like bold or making link, its not working and gives the error. Also, grapesjs-demo gives the same error. Attachment for error is available. Let me know asap, if anyone knows how to fix this issue.
![ckeditorerror](https://user-images.githubusercontent.com/33541046/41833787-2fdd82f2-786b-11e8-8b38-a86cb885d17a.png)
The text was updated successfully, but these errors were encountered: