Issue #6152Opened September 18, 2024by stpp21 reactions

BUG: CSS added via custom code persists after custom code component is removed

Question

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

any

Reproducible demo link

https://grapesjs.com/demo

Describe the bug

How to reproduce the bug?

  1. Add custom code component with HTML + CSS
  2. Delete custom code component.

What is the expected behavior? All code should be removed, including CSS

What is the current behavior? custom CSS is not being removed, though the rest is.

gjs.webm

Code of Conduct

  • I agree to follow this project's Code of Conduct

Answers (3)

artfOctober 9, 20241 reactions

This is not related to the core and should be addressed at the plugin level. Please create the issue there and we'll try to figure out the right approach.

stpp2September 21, 20240 reactions

Yeah clearStyles is already enabled in my case, but that doesn't seem to work well in many cases. Either way I'd expect the Custom Code component to be somewhat "containerized" so it's not leaving anything in the doc when removed.

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.