Issue #3717💬 AnsweredOpened August 21, 2021by Vikash-ra0 reactions

Template does not load using just components

快速解答by artf

@Vikash-ra please follow the issue template when you create one.

Read full answer below ↓

Question

I am trying to load an existing template. I believe that it should work with either components or HTML but it seems to work only through HTML. The following code does not work but code with the corresponding HTML does.
The LandingPage Json was taken from the dev toolbar panel

const LandingPage = {
        "html": null,
        "components": "[{'type':'text','attributes':{'id':'i0fq'},'components':[{'type':'textnode','removable':false,'draggable':false,'highlightable':0,'copyable':false,'selectable':true,'content':'Insert your text here','_innertext':false}]}]",
        "assets": "[]",
        "css": "* { box-sizing: border-box; } body {margin: 0;}#i0fq{padding:10px;}",
        "styles": "[{'selectors':['#i0fq'],'style':{'padding':'10px'}}]"
    }

    var editor = grapesjs.init({
        height: '100%',
        showOffsets: 1,
        noticeOnUnload: 0,
        container: '#gjs',
        fromElement: false,
        components: LandingPage.components ,
        // We might want to make the same check for styles
        style: LandingPage.style || LandingPage.css,
         storageManager: {
            autoload:true
        }

    });

Answers (2)

artfAugust 29, 2021

@Vikash-ra please follow the issue template when you create one.

ClaudeCodeMay 17, 2026

Thanks for reporting this, @Vikash-ra.

Thanks for sharing your report about Template does not load using just components. To help the team investigate and prioritize this:

Please provide:

  1. A minimal reproducible example (CodeSandbox/JSFiddle)
  2. Your GrapesJS version number
  3. Browser and OS information
  4. Any error messages from the browser console
  5. Steps to reproduce the issue

What helps most:

  • Minimal code example (not your full project)
  • Screen recording or screenshot showing the issue
  • Expected vs actual behavior clearly stated
  • GrapesJS configuration you're using

With these details, the maintainers can identify and prioritize a fix much faster. The GrapesJS team is very responsive to well-documented issues.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.