Is it possible to get CSS excluding protected CSS?
Question
I'm attempting to build this:
https://github.com/artf/grapesjs/issues/324
I've noticed that each time the CSS is saved, the protected CSS is prepended. This results in duplicate CSS rules:
`* {
box-sizing: border-box;
}
body {
margin: 0;
}
*{
box-sizing:border-box;
}
body{
margin-top:0px;
margin-right:0px;
margin-bottom:0px;
margin-left:0px;
}`
Is it possible to fetch CSS excluding protected CSS, or will I just need to remove that manually?Answers (1)
Use this option editor.getCss({ avoidProtected: true })
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3558
FEAT: Support Content-Security-Policy
To reduce the possible attack surface if the editor is used in "hostile" environments (e.g. in SaaS platforms) support for CSP is required....
Issue #3413
Adding inline scripts and updating old events
In that case, I suggest you access the document of the iframe and to append manually the inline script (to get the document use editor.Canv...
Issue #3119
[QUESTION] How to create custom block made of grapesjs components?
Hi, i want to have custom blocks made of grapesjs components. I found solution how to add components: https://github.com/artf/grapesjs/issu...
Issue #2148
[QUESTION] IE11 (Unable to get property 'style' of undefined)
Hi! Just faced the same issue: https://github.com/artf/grapesjs/issues/1295#issuecomment-410046832 While click on one of this buttons this....
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.