Grapes js version v0.16.34 giving unexpected script code after loading saved html
kindly any one help me to get out of this issue editor.setComponents(html text ); not working the script as expected after loading from saved template html while drag and drop its working after saving and again loading that html with editor.setComponents(html text ); then the existing script replacing the symbols like...
Read full answer below βQuestion
attaching code: while saving the html: <div class="gjs-row"> <div class="gjs-cell"> <div class="gjs-row"> <div class="gjs-cell"> <div id="i6x6"> <div id="bsrne9exd5" style="height:300px" tg="DataGrid" tagName="DataGrid" class="ag-theme-alpine"> </div> </div> </div> <div class="gjs-cell"> <div id="ibc4"> <div id="3drqn6v2q5" style="height:300px" tg="DataGrid" tagName="DataGrid" class="ag-theme-alpine"> </div> </div> </div> </div> </div> </div> <script>var items = document.querySelectorAll('#i6x6'); for (var i = 0, len = items.length; i < len; i++) { (function(){ var columnDefs = [{ headerName:...
Answers (3)
kindly any one help me to get out of this issue editor.setComponents(html text ); not working the script as expected after loading from saved template html while drag and drop its working after saving and again loading that html with editor.setComponents(html text ); then the existing script replac...
You can't load the generated HTML code back to the editor, read the documentation on how to correctly store and load templates https://grapesjs.com/docs/modules/Storage.html
Thanks for reporting this, @nithinpillalamarri123. Thanks for sharing your report about grapes js version v0.16.34 giving unexpected script code after loading saved html. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Your Gra...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3116
How to load css that can viewed in code viewer and also exported while saving
Hi :wave: I am trying to load some CSS within the editor as part of the theme, I am able to link stylesheets as part of loading but the pro...
Issue #6152
CSS added via custom code persists after custom code component is removed
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? any Reproducible demo link https://grapesj...
Issue #3512
Child elements not draggable ,droppable highlightable. also the CSS of all child elements not pushed in style section while develop a banner component in as plugin
Hello @artf , I am trying to develop a simple banner plugin which will be include a heading , subheading and link. and every element can be...
Issue #5090
Component script function runs twice after page save
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? 112.0.5615.137 (Official Build) (arm64) Re...
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 βBrowse Plugin Categories
Jump directly to plugin category pages on the marketplace.