GrapesJS / GrapesJS/components-custom-code

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

Open
#38 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
81
Forks
47
PR merge metrics
No merged PRs in 30d

Description

### GrapesJS version

- [X] 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](https://github.com/user-attachments/assets/3fbd9a6d-ad0e-4fc6-add8-7cf31ae9293c)

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reproducible demo at https://grapesjs.com/demo and follow the custom code component removal path after adding HTML and CSS. Done means deleting the component also removes its custom CSS, while the existing HTML and other code removal behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.