Ability to unload and destroy the editor instance or reload the config options?
You can access RemoteStorage and update urls at any time:
Read full answer below βQuestion
In my use case, I'm trying to change the store and load URLs used by the remote storage manager dynamically. As far as I can tell, the editor does not pick up and use any changes to the config if I change them directly, ie. after the editor has already been initialized. To try and get around it, I was attempting to unload the editor from the page programmatically by removing the target DOM element and recalling init. However, the init function seems to create multiple instances of the editor. I noticed the GrapesJS.editors array keeping track of them, so I tried setting this to empty to hopef...
Answers (3)
You can access RemoteStorage and update urls at any time:
const RemoteStorage = editor.StorageManager.get('remote');
RemoteStorage.set('urlLoad', [urlLoad]);
RemoteStorage.set('urlStore', [urlStore]);
@ajwootto ,
You can create a custom Remote Storage and inside it apply your custom saving/updating logic.
Take a look on this link: https://github.com/artf/grapesjs/wiki/API-Storage-Manager
Both of those options would probably work, however something I forgot to mention is that in some cases, I want to re-initialize the editor with components and styles pre-specified (ie. passing them in the init) rather than loading them from remote storage, but in other cases I want the initial cont...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1971
event triggers previous state attributes to remote storage
I'm trying to extract the change in src of an image and store it in the remote storage using Storage Manager, by using the following code T...
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 #876
[Feature] Pass store manager's response to editor's store callback
Hi @artf, We have a need to get a response of the store manager when calling editor.store() method with a callback (we return generated tem...
Issue #1985
[BUG] Autosave with remote storage doesn't send network requests
OS: Windows 10 Browser: Chrome 73 GrapesJS version: 0.14.57 I have remote storage configured using this call to grapesjs.init(): While I se...
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.