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
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Tutorial
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins β TinyMCE Inline Text Editor and Placeholder.
Tutorial
GrapesJS vs Webflow vs Builder.io vs Puck: Which Visual Builder to Choose in 2026
A practitioner's 2026 comparison of GrapesJS, Webflow, Builder.io, and Puck β pricing, AI features, lock-in, and a one-line rule for picking the right one
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.