GrapesJS Issues

3,464 parsed GitHub issues β€” 370 solved Β· 90 open. Search, filter and explore battle-tested answers.

336 issues found

πŸ” style-manager
#6458Mar 20, 2025by accvi4 answers
1 reactions

Sector.setName doesn't work

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://jsfiddle.net/qbpodnm4/ Describe the bug How to reproduce the bug? Select a component in the canvas. Go to the style manager and check if "General" is renamed to "Allgemein". What is th...

mosh-tudor

@accvi https://github.com/GrapesJS/grapesjs/discussions/6031#discussioncomment-10234496

accvi

Am I doing something wrong in the code? AI couldn't help.

artf

@accvi #6031 (reply in thread) ☝️

#6407Feb 16, 2025by gopukinapp2 answers
0 reactions

Custom traits are not loading inside a custom block

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Version 133.0.6943.98 Reproducible demo link https://codesandbox.io/p/sandbox/loving-breeze-mdls43?file=%2Findex.js%3A77%2C6 Describe the bug Iam trying to add some custom triats to my block unfortunately i can only see th...

artf

Your component has inner components, so if you select one of those, you will see traits of those components, not event-block. If you properly select event-block, you'll see your traits. <img width="856" alt="Image" src="https://github.com/...

GJS Helper

The issue you're encountering, where custom traits don't load for a custom block when its components property contains complex HTML but do load with a simple string, is a known behavior related to how GrapesJS parses and manages component...

#6376Jan 18, 2025by Harshsne261 answer
0 reactions

Setting min value to stylemanager config

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://codepen.io/Harshsne/pen/ZYzjaYe Describe the bug What is the expected behavior? border width should be incremented from 1 when min is set to 1. What is the current behavior? But the va...

GJS Helper

The issue you're encountering with the min value not affecting the initial display of 0 for border-width is a common point of confusion. The min property in GrapesJS style manager primarily affects the stepper/slider controls and validatio...

#6369Jan 14, 2025by hubermat2 answers
0 reactions

Display order of border radius is not correct

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v130 Reproducible demo link https://grapesjs.com/demo-newsletter-editor.html Describe the bug How to reproduce the bug?in the editor, select any elementin the styles section, go to border radius What is the expected...

DarrenHou1993

This change fixes the UI issue, but it introduces a value issue here. When setting the bottom-left corner radius, it actually modifies the bottom-right corner instead.

GJS Helper

The issue you've identified regarding the swapped display order of border-bottom-left-radius and border-bottom-right-radius in the GrapesJS Style Manager is a known quirk in the default configuration of older GrapesJS versions or specific...

#6365Jan 8, 2025by MLMarxx4 answers
0 reactions

Style Manager Fails to Interpret Descendant Selectors Correctly

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 131.0.6778.205 Reproducible demo link https://codesandbox.io/p/sandbox/naughty-microservice-5hp3h4 Describe the bug How to reproduce the bug:Add the dark-style class to the body: js editor.CssComposer.addRul...

artf

Yeah, that's not supported as there might be some performance implications trying to match any possible rule there. What you can do though is select any rule via styleManager.select

MLMarxx

Ok, thanks for clarification - currently using select, any ideas how to target media tags that way?

artf

You can get the CSSRule you need (getRule) and then pass it to styleManager.select

#6357Dec 13, 2024by Harshsne261 answer
0 reactions

!important is added to every component styles

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://codepen.io/Harshsne/pen/YPKwRBg Describe the bug How to reproduce the bug?Add row component from blockmanager.change its width in stylemanager .(!important is added because its default...

GJSBlock

Thanks for reporting this, @Harshsne26. Great question about !important is added to every component styles. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your sp...

#6318Nov 20, 2024by tonypapousek4 answers
3 reactions

Unable to use transparent fill in Block media svg

GrapesJS version[X] I confirm to use the latest version of [email protected] when this issue was filedWhat browser are you using? Firefox 132, Chrome 131Reproducible demo link https://jsfiddle.net/x54f9v68/1/Describe the bug How to reproduce the bug?Add a custom block, with the media property set to an SVG with...

samex

I believe it depends on the specific SVG being used. If you check the other SVG icons, you'll notice they don't have a fill attribute (inline) on the main <svg> tag but rather on the child <path> tags. By setting the fill="none" attribute...

tonypapousek

@samex Specifying fill="none" did the trick, thanks! That'll deffo help get my custom stuff working more predictably. Past that, I think the main pain point would be trying to use third-party SVGs (e.g. "react-icons") or wysiwyg output tha...

artf

Yeah I'd close this one as it's not strictly related to the core itself but thanks for point this out

#6248Oct 22, 2024by Frubl2 answers
1 reactions

ShowOffsets bug when iframe body has zoom

GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://jsfiddle.net/a2hbxg0y/1/ Describe the bug How to reproduce the bug?Open dev tools and write element style for iframe body - zoom: n; What is the current behavior? When hovering over an...

artf

You shouldn't edit the zoom of the iframe, use the native API

GJS Helper

You've identified a specific bug in GrapesJS related to the showOffsets feature when the iframe body has a CSS zoom property applied. This is a valid observation, and I can confirm the behavior you described. Issue Confirmation When zoom i...

#6152Sep 18, 2024by stpp24 answers
1 reactions

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

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?Add custom code component with HTML + CSSDelete custom code component. What is the expected behavior? All code should be remove...

artf

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.

mosh-tudor

@stpp2 This is not really a bug; it's more of a feature. :) Try using clearStyles: https://github.com/GrapesJS/grapesjs/blob/d48e1e34a9fa363dcb83fdcca53a89563db17063/packages/core/src/editor/config/config.ts#L260-L272

stpp2

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.

#6122Sep 4, 2024by mohamedsalem4013 answers
3 reactions

Fix and refactor Sorter.ts

[x] Fix the Sorter usage in StyleManager (regression with sorting property layers) [x] Refactor Sorter with the usage of Components.canMove [x] Update canMove with the check of dropping main Symbol inside its own instance.

mohamedsalem401

This's done.

mohamedsalem401

The idea is to refactor the sorter for improved maintainability and readability. We can implement the following changes:Make Sorter class depend on an abstract tree structure rather than relying on specific implementations like Component o...

GJS Helper

This fix and refactoring addresses several key areas within GrapesJS's Sorter.ts and component movement logic, resolving a regression in the Style Manager and enhancing the overall drag-and-drop experience, especially concerning reusable c...

Browse all topics