SetComponent() encodes anything in <script> tags
Thanks @jamesshin5 that will be fixed in the next release.
Read full answer below βQuestion
When loading in HTML through setComponent, quotation marks turn into """ and less than signs turn into "<".
Any help would be greatly appreciated!
Answers (4)
Thanks @jamesshin5 that will be fixed in the next release.
thanks so much for this! when do you think the next release will be? I did a workaround of just adding a component with script to canvas but want to change back asap
I hope really soon but can't tell the exact day. In case it might be useful, we auto-tweet new releases on our twitter account: https://twitter.com/grapesjs
Thanks for reporting this, @jamesshin5. Thanks for sharing your report about SetComponent() encodes anything in <script> tags. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Your GrapesJS version number Browser and OS informat...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3732
Comment component type do not support adding traits
i am working on a script that add a trait on all the component type , but the comment type do not have the prototype object. code
Issue #3528
I wasn't able to unit test grapesjs components
Not sure exactly whats happening but this is what I am getting. Sometimes tests are passing and randomly tests are failing due to this. Any...
Issue #3559
Page.getMainComponent().view gives undefined when page is selected
Hello @artf, I want to get the HTML Element of selected page. But it returns undefined when using following code:
Issue #4273
How to trigger the 'Import Template (modal)' on page load
Hello, Please i'm in need of the logic on how to the import template modal on initialization of the page... I'm using the newsletter preset...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins βPremium plugins ship with support, regular updates, and production-ready features β save days of integration work.
Browse premium plugins βRelated tutorials
In-depth guides on the same topic.
Tutorial
UnStudio for GrapesJS: 4 Plugins to Build Better Visual Editors
Meet UnStudio, a new GrapesJS plugin studio with four tools, safer and better editor: Command Palette, Responsive Pack, Autosave & Restore, and Autofill
Tutorial
Claude Skill for GrapesJS: How AI Is Changing the Way We Build Visual Editors
We've released the Claude Skill for GrapesJS Development β a free, open-source skill that turns Claude into a developer who actually knows GrapesJS
Tutorial
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps β a beginner-friendly 2026 comparison
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.