Replies: 1 comment
-
Replica of #5099. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a workflow where the final html and css are exported into separate files, which are then reinserted into the canvas on editing.
This works perfectly for html and css, but for javascript it does not.
For css I loop over urls of included files, adding them to an array, then add the array to the canvas element of
grapes.init
without issue.I try to do the same thing for js, but it does not work (i.e. the url is passed to
canvas.scripts
, but it does not act in the canvas.For context, I have created a component which uses a js script to populate itself, and the absence of js in the canvas on edit, results in the next export removing the component contents.
I think I have pinpointed the issue, which is that since the component's html content is generated by js, and since js will not load in, the component is nonexistent.EDIT: to clarify, the canvas recognises that the component exists, but the component is empty, so that on the next export, there is nothing to export.
I have tried placing the output of
editor.getJs
into the final html file, but this results in two of the same component being generated (the javascript already being placed in the html by grapes).Therefore, could I
canvas.scripts
Thank you for your time.
Beta Was this translation helpful? Give feedback.
All reactions