Editor.store(); fires multiple times
Every time you call save-db you attach a new listener pull it out from your command
Read full answer below ↓Question
Hi @all, I use my custom code to stop data to server. All works fine, but editor.store(); fires once on first click, twice on second click, three times on third click ... and so on. In storageManager -> type I use 'remote' - if use 'local' , fist click takes no effect. Can anyone help?
Answers (3)
Every time you call save-db
cmdm.add('save-db',{
run: function(editor, sender){
...
you attach a new listener
editor.on('storage:store', function(e) { ...
pull it out from your command
do it like this so we dont attach listeners every time
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 #1756
Drag and Drop not working in resized editor window in Google Chrome
Hi, I developed some components and all works fine in Firefox, Opera browser. In Google chrome also working fine in fullscreen editor mode...
Issue #1127
Command running multiple times
Hello Folks, I need your help.I created a custom button on the commands Panel to publish the site created from Grapes.When i click on it, i...
Issue #743
Editor.getComponents() load multiple times when refreshed.
Hello, editor.getComponents().add('<div class="grid-stack" style="height:800px;"></div>'); adds multiple times when refreshed, how stop thi...
Issue #1150
Get Uploads as Base64
Hello All, I need help integrating this into a web app that I have. Everything renders and works as expected but I am trying to get the upl...
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.