` tag not escaped for script properties","url":"https://gjs.market/issues/4754-closing-script-tag-not-escaped-for-script-properties"},{"@type":"ListItem","position":90,"name":"css class name with '/' converted to '-'","url":"https://gjs.market/issues/4739-css-class-name-with-converted-to"}]}

GrapesJS Issues

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

569 issues found

๐Ÿ” canvas
#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...

ClaudeCode

Thanks for reporting this, @SagarMaria. Great question about Style:property:update and Property onChange trigger excessively. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documen...

#5083April 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

#4998March 22, 2023by glaprida4 answers
0 reactions

showOffsetsSelected not working

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chome v111 Reproducible demo link https://codepen.io/glaprida/pen/YzOJOGq Describe the bug How to reproduce the bug?Open the codepen link. Drag any basic block to canvas with some margin or padding.You will see that showOf...

glaprida

Hi, I see that now it works while hovering the element even if it is selected (previously it only worked on non-selected elements) ...but it only shows the offsets while hovering (I thought showOffsetsSelected would show the offsets of the...

artf

Yeah at the moment this is what is intended to do. Probably one day we'll revisit this to make it more customizable (ability to extend/create style handlers on canvas)

glaprida

Hi there, sorry for the insistence... but is there any way you could think of that I can achieve this? What I need is to show the offsets of the selected element, no matter if it's hovered or not.

#4991March 21, 2023by glaprida1 answer
0 reactions

Wrong Placeholder marker when dragging a display:grid element

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v111Reproducible demo link https://codepen.io/glaprida/pen/eYLLXbQDescribe the bug How to reproduce the bug?Go to the codepen link https://codepen.io/glaprida/pen/eYLLXbQDrag one section to the canvasDrag another oneW...

ClaudeCode

Thanks for reporting this, @glaprida. Great question about Wrong Placeholder marker when dragging a display:grid element. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for...

#4906February 6, 2023by panditlakshya2 answers
0 reactions

Grapesjs fails to recognize component types when setting innerHTML through script.

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? chrome v108.0.5359.98 Reproducible demo link https://codesandbox.io/s/grapes-js-template-literal-forked-6kgvrb?file=/src/App.js Describe the bug I'm trying to create a custom component that recognizes inner html component...

artf

Read carefully this guide, everything inside script is outside of the editor scope. You can update the component itself by using component.components method or specify the components: '<div ....' directly in definition.

ClaudeCode

Thanks for reporting this, @panditlakshya. Great question about Grapesjs fails to recognize component types when setting innerHTML through script.. The recommended approach with Canvas is to use the event-driven API. Start here: Check the...

#4904February 5, 2023by handhikadj2 answers
0 reactions

getHtml() producing invalid structure when there is js inside it

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? chrome latestReproducible demo link https://jsfiddle.net/snj87o6f/1/Describe the bug Context/Description I think this is a bug because I need to save and load the data back with editor.Parser.parseHtml on onStore of storageM...

artf

The output is correct (check the real console not the broken one from jsfiddle) and read carefully this section, you should never rely on HTML/CSS to load back the project.

ClaudeCode

Thanks for reporting this, @handhikadj. Great suggestion about getHtml() producing invalid structure when there is js inside it! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Usi...

#4848January 16, 2023by NicoGGG2 answers
1 reactions

Component content is set to empty string after inline editing

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox v91.4.1 Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug?Go to the grapesjs basic demo: https://grapesjs.com/demo.htmlClear the canvasAdd a component LinkExecute edito...

artf

This is expected due to some logic related to the rich text editor. You can use component.getInnerHTML() to get the inner HTML or component.components() to get inner components.

ClaudeCode

Thanks for reporting this, @NicoGGG. Great question about Component content is set to empty string after inline editing. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for...

#4847January 15, 2023by wunksert3 answers
0 reactions

Css edits aren't persisted to the DOM

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome Version 109.0.5414.87 Describe the bug How to reproduce the bug?Create a @keyframes animation on the GrapesJS canvasIn JS, create a new CssRule by passing the following string into editor.Css.addRules:Add it to the ca...

artf

Seems to be related to CssGroupRuleView here. In case of at-rules like @keyframes we have to force the re-render of the parent container.

wunksert

@artf facing this issue again with editor.CssComposer.remove(myCssRule) the editor css removes the rule but it's not flushed through to the DOM. How to you recommend I force re-render of the DOM while keeping the state of my editor intact?...

ClaudeCode

Thanks for reporting this, @wunksert. Great question about Css edits aren't persisted to the DOM. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific mod...

#4754November 30, 2022by jasonliang-dev2 answers
0 reactions

Closing `</script>` tag not escaped for script properties

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 107.0.5304.122 (64-bit) Reproducible demo link https://jsfiddle.net/j5khz1gm/ Describe the bug How to reproduce the bug?Create a custom component type with the following default properties:Add the custom com...

derciesto

@jasonliang-dev any update on this? i facing same issue.

ClaudeCode

Thanks for reporting this, @jasonliang-dev. Great question about Closing </script> tag not escaped for script properties. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentati...

#4739November 20, 2022by hemaltandel12 answers
0 reactions

css class name with '/' converted to '-'

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Edge Version 107.0.1418.52 (Official build) (64-bit)Reproducible demo link https://codesandbox.io/s/peaceful-glade-rbfbwt?file=/src/app/app.component.tsDescribe the bug How to reproduce the bug?Create new app with grapejscal...

artf

You should still be able to use the escapeName option

ClaudeCode

Thanks for reporting this, @hemaltandel1. Great question about css class name with '/' converted to '-'. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific mo...