Issue #1531💬 AnsweredOpened October 19, 2018by alfaalex810 reactions

Css class

Quick answerby alfaalex81

For example i have this code on canvas GrapesJs add to CSS this class This rule modify all element with this class, this is a generic bootstrap class that we use in all site.

Read full answer below ↓

Question

Hi! Probably this problem is already posted, but I can't understand where I'm wrong. I use this three parameters on init GrapesJs.

                protectedCss: '',
                avoidInlineStyle: true,
                forceClass: true,

I would like GrapeJs not to edit preexisting css, but only creates its own. Is it possible?

Thank you!

Answers (3)

alfaalex81October 22, 2018

For example i have this code on canvas GrapesJs add to CSS this class This rule modify all element with this class, this is a generic bootstrap class that we use in all site.

artfOctober 29, 2018

@alfaalex81 I can't reproduce it, create a live demo please

alfaalex81October 30, 2018

https://jsfiddle.net/ugc1otnk/ In the example when i change background color in the first column, GrapesJs set the css attribute to the external class "col-md-6", that is a bootstrap class name. I prefer Grapesjs set own class. Moreover I think I've found a bug. Select the first column and deselect...

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.