Issue #2263Opened September 11, 2019by benvmatheson0 reactions

[Question]: Is it possible to get CSS excluding protected CSS?

Question

Code SnippetTEXT
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)

artfSeptember 14, 20190 reactions

Use this option editor.getCss({ avoidProtected: true })

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.