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
Introducing Search on GJS.Market
GJS.Market now has one search across everything we publish โ plugins, articles, community questions, guides, authors and services. Press โK from any page.
Tutorial
GJS.Market Is Now Available for India ๐ฎ๐ณ
GJS.Market is expanding its global presence with a dedicated experience for developers, agencies, SaaS companies, and digital creators in India
Tutorial
How to Build an AI-Powered Page Builder with GrapesJS in 2026
What we learned building GJSDocs โ from simple AI text generation to structured, context-aware visual editing
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.