BUG: The attributes of the script tags are being removed on the canvas.?
Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
latest version of Chrome
Reproducible demo link
https://grapesjs.com/demo.html
Describe the bug
How to reproduce the bug? Taking an html string and rendering it in grapesjs with this code (I have allowScripts enabled)
editor.setComponents(`
<script crossorigin id="__NEXT_DATA__" type="application/json" className="__NEXT_DATA_">
{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"Uz1QzXNKIaETkx6R8ZvHn","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}
</script>
`)
This is the rendered canvas
This is an image of the html string that can be exported
So the final output has the attributes but not the canvas element
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (0)
No answers yet.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6152
BUG: 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://grapesj...
Issue #5584
BUG: "storage:end:load" event is not triggered when all components are mounted into the canvas
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v91 Reproducible demo link https://...
Issue #5378
BUG: Uncaught TypeError: Cannot read properties of undefined (reading 'Canvas') while dragging a component in Layer Manager Panel
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v116.0.5845.97 Reproducible demo li...
Issue #6683
BUG: Modals close on mouseup event outside of modal rather than a full click
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 143.0.7499.169 Reproducible demo li...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.