GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS
http://grapesjs.com/demo-mjml.html
BSD 3-Clause "New" or "Revised" License
648 stars 229 forks source link

BUG : edit text on mj-text after set background-color doesn't work #326

Closed ElioNeyt closed 1 year ago

ElioNeyt commented 1 year ago

Hey,

When i add mj-text block on my editor, if i add a background color and edit text, the text isn't update in data. It keep "insert text here" so when i save it, the text that i added isn't save. But if i don't change background color, it's working.

I reproduce it on GrapesJS mjml demo

Thanks for all PS: sorry for my english, i'm french 😏

UPDATE : Caused by CKEDITOR, I fix it with :

this.editor.on('component:styleUpdate', (componentUpdated)=>{
  Object.keys(CKEDITOR.instances).forEach(function(instance) {
    CKEDITOR.instances[instance].destroy();
  })
});
artf commented 1 year ago

Seems to work fine with the latest update to CKEditor plugin

ElioNeyt commented 1 year ago

Thanks ! But i keep this update code (above) because if i don't use it, i can't edit with CKEditor and right panel at the same time.