Can i load editor content dynamically?
Question
I have a API rest that receives and supplies the contents of the editor items. The entire store created by the editor is saved: assets, components, css, ... Each item is accessible via route (eg editor / page / 4), when loading the route API returns to the content of the item, however when calling the action editor.storeManager.load (content), I can not load the content to the editor.
What would be the best way to work with this flow?
Thank you for your attention.
Answers (2)
If for content you mean html/css, probably you're looking for editor.setComponents('<div>...')
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 #597
storageManager: Loading from remote storage
Hi, I'm trying to read the HTML and CSS from my database. When I try to load it into the editor, nothing displays. I can store the data jus...
Issue #1429
Empty content when load from remote storage if components array is not empty
I have problem loading stored remote content into the editor when the JSON contains non empty gjs-components My JSON data looks like this w...
Issue #833
[Bug]: on click of links with events Editor loading inside another editor
I am trying to load an existing Ad content into GrapesJS editor. On dragging new custom components into editor with some script, editor is...
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.