Grapesjs-react
You could use the editor.setComponents to load the HTML. Here you can see an example: https://github.com/artf/grapesjs/wiki/API-Editor#setcomponents You will need to get the content from the HTML file first.
Read full answer below ↓Question
how to load an html file while starting the GrapesJs-react- editor
I tried in this way but it is not working,
editor.StorageManager.add('local', { load() { 'template.html' }, });
Answers (3)
You could use the editor.setComponents to load the HTML. Here you can see an example: https://github.com/artf/grapesjs/wiki/API-Editor#setcomponents
You will need to get the content from the HTML file first.
To be honest @hemanthmc , by lookings this:
load() {
'template.html'
},
I'm not sure you even know what you're doing...
Start from the beginning: https://grapesjs.com/docs/getting-started.html
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1059
[Question]: Load html content from a file dynamically
Hi, I need to load content from a html file from server onto editor after or while initializing editor. How this can be implemented? HTML w...
Issue #2073
[QUESTIONS] Trouble using urlLoad
I've got an issue calling to my endpoint to load a template, it's doing a pre flight OPTIONS request but I cant find how to continue after...
Issue #1836
How to add !important in all the generated apis
Hello @artf, While i am going to edit some html from editor with the help of css then i need to add !important into all the css which is ch...
Issue #1757
Remote storagemanager not working
Hello, For 2 days I am fighting with the storageManager. I couldn't load template from remote file. Finaly I discovered that it is working...
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 →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.