How can we import JS scripts to our page #4776
Unanswered
shelendravashishtha2
asked this question in
Q&A
Replies: 2 comments
-
you can insert js/css to the Canvas as follows |
Beta Was this translation helpful? Give feedback.
0 replies
-
If you need to import scripts you should enable it first grapesjs.init({
// ...
parser: {
optionsHtml: { allowScripts: true }
}
}) |
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.
-
Hi,
I'm trying to render a template on grapesjs editor, though the template html and css are getting rendered on Editor successfully, Without including JS, The imported template looks like a complete mess, I found Component api in which we can define script but can't find any method so that we can include JS.
I am importing the html and css using below methods
editor.setComponents(); editor.setStyle();
And also if there is any solution to that, is there a way to set html, css and js for pages without even rendering them on editor.
Beta Was this translation helpful? Give feedback.
All reactions