Unable load predefined template.
Question
I want to show a predefined template when users open grapesJs something like this: Storage manager.
HTML:
<div id="gjs" style="height:0px; overflow:hidden"></div> <script src="app.js"></script>
javascript in app.js:
// Set up GrapesJS editor with the Newsletter plugin
const LandingPage = {
html: '<div> style="background-color="red"; height="100px"; width="100px"</div>',
css: null,
components: null,
style: null,
};
components: LandingPage.components || LandingPage.html,
style: LandingPage.style || LandingPage.css,
clearOnRender: true,
storageManager: {
id: 'gjs-',
type: 'local',
autoload: true,
autosave: true,
storeComponents: true,
storeStyles: true,
stepsBeforeSave: 1,
// contentTypeJson: true,
},
Result: Blank editor

Answers (2)
@dukie66 <div> style="background-color="red"; height="100px"; width="100px"</div> this is not how you supposed to write HTML
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1433
Toolbar on hover
@artf how can we show toolbar on hover. Currently toolbar is open when we select any element but I want to show it on hover. Any help would...
Issue #2710
[QUESTION] Unsplash images in asset manager modal
Hello, I want to add a support for unsplash API when user opens AsssetManager modal with search input (similar to Grapedrop) Is there an ea...
Issue #3574
adding traits are not picked up by trait manager.
Following example from docs . Is there further configurtion to make new traitsa show for elements? The example using the input does not run...
Issue #2893
[Question] Can I set for loop value in components render?
Hi,I'm beginner in grapesjs. I want to make a question number by for loop when I dropped components, ↓I want final like this image. the div...
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.