Closed barryross closed 2 years ago
When removing a value from the background-color property and pressing enter , the color doesn't effectively get removed.
background-color
A workaround is to listen for changes to the background color property, and bind a transparent value to the model
transparent
this.editor.on('component:styleUpdate:background-color', (model) => { const updateToBg = this.editor.StyleManager.getProperty('background_&_border', 'background-color').attributes.value; let s = model.getStyle() if (!updateToBg) { model.setStyle({...s, 'background-color':'transparent'}); }else{ model.setStyle({...s, 'background-color':updateToBg}) } }); });
Closing as it doesn't appear to be an issue anymore with the latest versions
When removing a value from the
background-color
property and pressing enter , the color doesn't effectively get removed.A workaround is to listen for changes to the background color property, and bind a
transparent
value to the model