BUG: Attempts to load scripts to canvas maybe breaks javascript??
Question
Version: 0.16.44
Are you able to reproduce the bug from the demo?
[ ] Yes [x] No
What is the expected behavior? Legit anything else
Describe the bug detailed
I was attempting to load scripts into the canvas. My first attempt was scripts: [] and then I ran into the synchronization issue mentioned in this PR's thread: https://github.com/artf/grapesjs/pull/67
I saw an example from @artf showing another way to do it with a property called components. Doing this broke the javascript parser. I'm not kidding; I posted a screenshot to prove it.
Also interesting to note: the text saying "TAG LOAD" in my console is coming from the script I was trying to load. So it... worked? Despite the page crashing due to the syntax being "invalid".
What is the current behavior? Seems to break Javascript parser?? O.o <img width="795" alt="Screen Shot 2021-03-11 at 2 31 27 AM" src="https://user-images.githubusercontent.com/7225168/110752290-126c2980-8213-11eb-87f4-a32ff83efc0b.png"> <img width="359" alt="Screen Shot 2021-03-11 at 2 40 31 AM" src="https://user-images.githubusercontent.com/7225168/110752363-2f086180-8213-11eb-9361-ed26ebae1fe1.png"> <img width="991" alt="Screen Shot 2021-03-11 at 2 42 18 AM" src="https://user-images.githubusercontent.com/7225168/110752605-7d1d6500-8213-11eb-9f5a-b63816c411f9.png">
Answers (1)
I haven't used inline <script> tags in a while and forgot about this caveat of the HTML parser. Closing this.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3343
BUG: Illegal Invocation error when using keepEmptyTextNodes
Version: 0.16.44 Are you able to reproduce the bug from the demo?[x] Yes[ ] No Set editor.Parser.getConfig().keepEmptyTextNodes = true; in...
Issue #3295
BUG (v0.16.41): Button component with draggable property is not working properly
Version: v0.16.41 Are you able to reproduce the bug from the demo? [ ] Yes [ ] No What is the expected behavior? When we have a button with...
Issue #3134
BUG: Canvas scroll to top of the page when I try to drag an element from the last sections
Version: 0.16.27 Are you able to reproduce the bug from the demo? [ X] Yes [ ] No What is the expected behavior? When a try to drag a compo...
Issue #2982
BUG: Executing editor.load(x) on x = editor.store() results in error.
Version: 0.16.18 Are you able to reproduce the bug from the demo? [X ] Yes [ ] No What is the expected behavior? I would expect that assets...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.