Issue #2469Opened December 24, 2019by simplecommerce1 reactions

[BUG] Adding buttons to RTE toolbar in React App causes buttons to be duplicated.

Question

  1. Are you using the latest release (older versions are NOT supported)?
    • YES, 0.15.9
  2. Are you facing the bug with your local copy of GrapesJS or with the current demo?
    • Local copy
      • Are you able to reproduce the bug from the demo?
        • No, not React app.
  3. What is the expected behavior?
    • Toolbar buttons should only be added once on load of editor.
  4. What happens instead?
    • When navigating away and coming back to the editor, the toolbar buttons are duplicated, as many times as navigation is done.
  5. If you're able to reproduce the bug indicate all the necessary steps Attach screenshots (using KAP/LICEcap), screencasts or live demo

Result should be:

Initial look:

image

After navigation:

image

Answers (2)

artfDecember 25, 20191 reactions

Ok, seems like we don't clear the RTE instance in the destroy method... I'll fix it for the next release

simplecommerceDecember 24, 20190 reactions

For now, I have to do rte.remove before my rte.add so it doesn't duplicate.

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.