BUG: added style able events such that styling can be overwritten, open
Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
Version 111.0.5563.147 (Official Build) (64-bit)
Reproducible demo link
I provided code
Describe the bug
added styleable events such that styling can be overwritten https://github.com/GrapesJS/grapesjs/issues/1041 https://github.com/GrapesJS/grapesjs/pull/1056 @tommedema , @artf can you check this, please
I'm using this logic for a style overridden
editor.on('styleable:change', (model, property) => {
const value = model.getStyle()[property];
if (value.indexOf('!important') === -1) {
model.addStyle({ [property]: value + ' !important' });
}
});
with this functionality, style is overriding the first time, and on the second time when I remove the style from style-manager and then add it again so it is not working and does not get any style.
once I refresh then active again and can add style only one time
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (0)
No answers yet.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5059
BUG: on second-time use template grapes editor not accepting css which the editor created with random ids on the first time
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 111.0.5563.147 (Official Build) (6...
Issue #6040
BUG: Cannot read properties of undefined (reading 'lastComponent')
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 127.0.6533.89 (Official Build) (64...
Issue #5046
BUG: is there any way to remove cross svg on selected default value of Float, Position and text-align
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 111.0.5563.147 (Official Build) (6...
Issue #5942
BUg in RichTextEditor
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? chrome Reproducible demo link i have given...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.