Update script won't refresh component script properly after autoloading component from html in localStorage
gjs-html contains the final HTML, the HTML your users will gonna see so it's correct that you see the script "compiled". For a correct editing, you have to rely on gjs-components which is basically a JSON representation of the template and so contains all the informations about your components
Read full answer below ↓Question
I'm using GrapesJS v0.14.5 in a local copy. OS: Ubuntu 16.04 LTS Browser: Chrome Version 64.0.3282.140 (Official Build) (64-bit) I think I can't reproduce it from the demo I have a component with the current script: (The "comp" variable part is from a plugin functionality I'm currently developing, but I think you can ignore it) As you can see I'm rendering a Vue component. This component has some data binded using traits. When I add the component in canvas and change it's traits, the script is immediately updated and reload the component with the new message, since I'm using updateScript meth...
Answers (2)
gjs-html contains the final HTML, the HTML your users will gonna see so it's correct that you see the script "compiled". For a correct editing, you have to rely on gjs-components which is basically a JSON representation of the template and so contains all the informations about your components
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1115
[BUG] core:canvas-clear removes CSS Composer Styles
I am using the core:canvas-clear command assigned to a button but when this is pressed, the styles setup through the CSS Composer are also...
Issue #1411
Manual triggering of the asset manager rendering is required after opening the AM pop-up
Questions Q: Are you using the latest release (older versions are NOT supported)? A: Yes Q. Are you facing the bug with your local copy of...
Issue #1941
[BUG]: When dragging a block over the canvas, JS in script, is appended in canvas before dropping the block.
You're submitting a BUG Are you using the latest release (older versions are NOT supported)? v0.14.57 Are you facing the bug with your loca...
Issue #1758
Unable to load in CSS string with characters such as '#' with setStyle()
You're submitting a BUGAre you using the latest release (older versions are NOT supported)?If you're not sure, type grapesjs.version in con...
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.