Allow to import javascript modules
Nice I like it, for anyone interested in making a PR the code to update is here: https://github.com/artf/grapesjs/blob/aee18dcf0602e5d56e7670deb8d4ffbf31c73008/src/canvas/view/CanvasView.js#L140-L161
Read full answer below ↓Question
When using Ionic StencilJS, the components are imported using the new module support: On {canvas: scripts: []} I can only load external scripts by their url. To cover such case, we could import modules as this: The final result inside canvas would be: Notice that this would cover also the case when we want to use integrity or crossorigin in <script> tags and, of course, inserting a url string would still work as it is today.
Answers (3)
Nice I like it, for anyone interested in making a PR the code to update is here: https://github.com/artf/grapesjs/blob/aee18dcf0602e5d56e7670deb8d4ffbf31c73008/src/canvas/view/CanvasView.js#L140-L161
Hi can I start from yours code to init grapesjs not in the html file but in a separated js file? Thank you
@artf it looks like this feature has been implemented. There is a minor issue where type will default to 'text/javascript'. For HTML 5 it should be omitted but should not cause any issues if there.
Should this issue be closed?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1936
Absolute/Designer mode
Hi guys, this issue is an overview of what is it, what is done, what to do and nice-to-have to complete the Designer Mode feature.Preface S...
Issue #761
Text component problem
Hi. I wish a text component that do not create new components every time I press "Enter" key to create new paragraphs (this is a bad usabil...
Issue #2656
[BUG] Wrong position of toolbar when duplicate children component
Hi, you can check this example: https://codepen.io/abozhinov/pen/XWbqjEJ Steps to reproduce the problem:If components existing delete them...
Issue #896
[BUG] Media query rules are overridden by class rules in canvas
Hi @artf , I've noticed an issue while testing one of my templates using different device configurations that supposed to trigger media que...
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.