Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: The attributes of the script tags are being removed on the canvas.? #5563

Closed
2 tasks done
leo-budgetsimple opened this issue Dec 18, 2023 · 0 comments
Closed
2 tasks done

Comments

@leo-budgetsimple
Copy link

leo-budgetsimple commented Dec 18, 2023

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
@artf artf closed this as completed in a964d99 Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant