Issue #661💬 AnsweredOpened December 20, 2017by mingodad0 reactions

Class attribute not removed

Quick answerby mingodad

Trying to find the problem I can see that the canvas has the class removed but not the model, I'm trying to find where in code it was supposed to be removed but I'm having a hard time finding it. Anyone has any idea ?

Read full answer below ↓

Question

Hello ! I noticed a problem with style manager when we add/remove classes. When we remove all classes it doesn't remove then from the generated source.

Steps to reproduce: 1- Select an element to style (preferable one without any class) 2- Add a new class 3- Look the generated source code (View code) the class should be there as expected 4- Remove the class in the style manager (we should not have any class here now) 5- Look the generated source code (View code) the class is still there (should not be there)

Cheers !

Answers (3)

mingodadDecember 21, 2017

Trying to find the problem I can see that the canvas has the class removed but not the model, I'm trying to find where in code it was supposed to be removed but I'm having a hard time finding it. Anyone has any idea ?

mingodadDecember 21, 2017

After several attempts I found a place to clear the class from the model but I'm not sure that this is the best place or form to achieve it. In SectorsView.js:targetUpdated()

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.