GrapesJS Issues

3,464 parsed GitHub issues โ€” 370 solved ยท 90 open. Search, filter and explore battle-tested answers.

336 issues found

๐Ÿ” style-manager
#5105May 11, 2023by Baghunts2 answers
1 reactions

Adding style o component by (prop, value), isn't work correct.

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome@latest Reproducible demo link https://no-link.com Describe the bug Code of Conduct [X] I agree to follow this project's Code of Conduct

artf

Thanks @Baghunts, good catch. Current workaround would be .addStyle({ 'border-left': '...' })

GJS Helper

The issue where a background-image style isn't applied correctly to a component in GrapesJS is typically due to one of two common reasons: incorrect CSS url() syntax or the component lacking sufficient dimensions to display the background....

#5090May 3, 2023by FaisalShaikhHA2 answers
1 reactions

Component script function runs twice after page save

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? 112.0.5615.137 (Official Build) (arm64) Reproducible demo link https://grapesjs.com/demo.html Describe the bug Component definition: When dropped, saved, and reload there are two places that call the same script. One in th...

artf

As explained here you should not reimport the output HTML to edit the project, only the JSON.

GJS Helper

The issue you've encountered where a component's script function runs twice after saving and reloading the page is a known behavior (or a bug, depending on the perspective) in GrapesJS's script management system. It stems from how GrapesJS...

#5089May 2, 2023by davidrhoderick3 answers
0 reactions

Error importing codemirror library in SCSS

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 112.0.1 Reproducible demo link https://github.com/davidrhoderick/grapesjs-test Describe the bug How to reproduce the bug?Follow getting started (you can see the structure I am following with a basic Parcel project...

davidrhoderick

Funnily enough, the CSS-based styling works.

artf

Looks like the Parcel transformer is trying to import codemirror/lib/codemirror.js instead of codemirror/lib/codemirror.css on this line: So I'd suggest to open the issue on the related package

GJS Helper

The issue you're encountering, @parcel/transformer-sass: expected "{" when importing GrapesJS SCSS, is a common problem related to how module bundlers like Parcel resolve and process stylesheet imports, especially when dealing with third-p...

#5086May 2, 2023by SagarMaria3 answers
0 reactions

Style:property:update and Property onChange trigger excessively

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 112.0.5615.137 (Official Build) Reproducible demo link https://jsfiddle.net/SagarMaria/sunygp2f/3/ Describe the bug How to reproduce the bug?In the jsfiddle simply click on the "Hello World" component. Obser...

artf

The behaviour is correct as style:property:update triggers on any update of the Style Manager Property (not only its value). So for your specific case you would need to update the callback in this way

SagarMaria

Hi @artf, thanks for the quick reply, but actually, part of the problem is still that even after making a change e.g. click "center" align radio option with the if statement you suggested, subsequent selections of that component still log...

GJS Helper

The issue you're encountering with style:property:update and Property onChange firing excessively, even on component selection, is a common point of confusion. The style:property:update event is a low-level event that triggers whenever a s...

#5083Apr 29, 2023by DanavsSite4 answers
0 reactions

Blocks are not draggable to canvas

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Tauri Reproducible demo link Describe the bug How to reproduce the bug?... What is the expected behavior? ... What is the current behavior?** ... If is necessary to execute some code in order to reproduce the bug, paste it...

DanavsSite

DanavsSite

i just found out its because of webview2.Support for webview2??!

artf

I think this is more related to some Tauri configuration instead of GrapesJS as we're using the native HTML5 drag and drop

#5059Apr 19, 2023by abubaker4172 answers
0 reactions

On second-time use template grapes editor not accepting css which the editor created with random ids on the first time

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 111.0.5563.147 (Official Build) (64-bit) Reproducible demo link I can't Reproducible on jsfilddle. i provided detail below. Describe the bug How to reproduce the bug?This is my template which I uploaded in Grapes i...

artf

@Spiral1234 if you're not able to reproduce the issue it's probably something on your end and without a reproducible demo it's hard to understand what might be a problem

GJS Helper

The issue you're encountering stems from how GrapesJS processes and normalizes styles, particularly inline styles, when importing HTML. Let's break down the root cause and provide the correct approach. Root Cause Explanation When GrapesJS...

#5052Apr 16, 2023by innothetechgeek2 answers
0 reactions

Styles loaded through vue entry point not working

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link N/A Describe the bug I'm integrating the grape.js plugin with vue.js. I have a prebuild page with prebuild html and css. When I load the page vue.js component(s) into the editor, all my vue.js...

artf

@innothetechgeek for a proper bug issue you should always create a reproducible demo as commonly there are issues unrelated to the core itself. Anyway, from your description you might want to define your styles entry via canvas options

GJS Helper

The issue you're experiencing, where styles loaded through your Vue.js entry point are lost when GrapesJS initializes, is a common behavior and stems from how GrapesJS isolates its editor canvas. Root Cause GrapesJS, by default, renders it...

#5049Apr 13, 2023by ronaldohoch4 answers
2 reactions

Problem when dragging component composed by image and link

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Brave last version Reproducible demo link https://jsfiddle.net/rp7oc96v/1/ Describe the bug Hi Arthur! I'm creating a new component, an image inside a link, like the mj-image component, but i'm stuck in one configuration o...

gustavohleal

Hi! I've tested your solution. It does change the image correctly with the image locked inside the main component and you can move it around. The src attribute is changed in the model, but when you move the component he goes back to the pl...

artf

@gustavohleal my bad, you have to update the src property directly instead of the attribute image.set({ src: asset.getSrc() });

artf

Use the data-gjs-locked="true" property to ignore the image and update properly your custom component

#5040Apr 10, 2023by abubaker4171 answer
0 reactions

Added style able events such that styling can be overwritten, open

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 111.0.5563.147 (Official Build) (64-bit) Reproducible demo link I provided code Describe the bug added styleable events such that styling can be overwritten https://github.com/GrapesJS/grapesjs/issues/1041 https://...

GJSBlock

Thanks for reporting this, @abubaker417. The issue with added style able events such that styling can be overwritten, open appears to be a race condition or state management timing problem. This typically happens when component lifecycle e...

#5020Mar 31, 2023by at-codes2 answers
1 reactions

Changing Title Attribute on Views Panel Buttons Doesn't Persist

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? ChromeReproducible demo link https://jsfiddle.net/em9kt2Lb/Describe the bug How to reproduce the bug? Implement the code below on editor load What is the expected behavior? Button titles change and stay changed What is the c...

artf

Hi @at-codes titles for panel buttons are connected directly to i18n locale strings so you'll need to update those strings there. You can find more info about the i18n module here.

GJS Helper

The issue you're encountering, where button titles revert after being clicked, stems from directly manipulating the DOM elements of GrapesJS UI components. GrapesJS, like many modern web frameworks, manages its UI through underlying data m...

Browse all topics