Issue #5563Opened December 18, 2023by leo-budgetsimple0 reactions

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 image

This is an image of the html string that can be exported image

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.