Cannot load javascript under grapesjs
Question
Can javascript under the grapesjs panel load?
Answers (3)
Hi @henry930,
I fixed this problem by developing an reloader.
let editorConfig = {
// your configs
}
let editor = false;
function editorLoad(){
$(editorConfig.container).empty(); // with JQuery
editor = grapesjs.init(editorConfig);
editor.load();
}
editorLoad();
If you want to update your config,
// for example
/*
old
editorConfig.height = '100px'
*/
editorConfig.height = '150px';
editorLoad();
Your editor will reload. Your html, css... will remain.
i dont understand how in 4 years it still does not supports importing single html file that renders with javascript ? most styling are very off
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2763
GrapesJs and PHP - store and load data to show in editor and as HTML page as well
I am using GrapesJS to build a simple webpage. I included the script in the following way inside head part : I am using GrapesJS to build a...
Issue #5378
BUG: Uncaught TypeError: Cannot read properties of undefined (reading 'Canvas') while dragging a component in Layer Manager Panel
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v116.0.5845.97 Reproducible demo li...
Issue #5363
BUG: cannot "sort" elements of layer panel
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Version 1.56.20 Chromium: 115.0.5790.171 (Of...
Issue #2828
[BUG] Problem with link and CKEditor
There is a problem with link and CKEditor. I enabled editable property for <a> tags: And when I doubleclick on the link it is editable, all...
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.