Issue #743💬 AnsweredOpened January 11, 2018by suchithmahadi0 reactions

Editor.getComponents() load multiple times when refreshed.

快速解答by artf

well if you add, the editor stores the template (local/remote), after refresh editor loads it and you still use add... well, it's a correct behavior.

Read full answer below ↓

Question

Hello, editor.getComponents().add('<div class="grid-stack" style="height:800px;"></div>');

adds multiple times when refreshed, how stop this. it should add only once.

Answers (3)

artfJanuary 11, 2018

well if you add, the editor stores the template (local/remote), after refresh editor loads it and you still use add... well, it's a correct behavior.

suchithmahadiJanuary 11, 2018

is there a way to add only once.

suchithmahadiJanuary 12, 2018

@artf Is there a way to add only once ?

Thanks

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 →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.