[BUG] Adding buttons to RTE toolbar in React App causes buttons to be duplicated.
Question
- Are you using the latest release (older versions are NOT supported)?
- YES, 0.15.9
- 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.
- Are you able to reproduce the bug from the demo?
- Local copy
- What is the expected behavior?
- Toolbar buttons should only be added once on load of editor.
- What happens instead?
- When navigating away and coming back to the editor, the toolbar buttons are duplicated, as many times as navigation is done.
- If you're able to reproduce the bug indicate all the necessary steps
Attach screenshots (using KAP/LICEcap), screencasts or live demo
- https://codesandbox.io/s/react-router-basic-49ki1?fontsize=14&hidenavigation=1&theme=dark
- Click on the Dashboard link.
- Double-click on the text to edit, look at the toolbar.
- Click on another link, except Dashboard, at the top and click back on Dashboard.
- Double-click to edit the text again.
- Do it as many times as needed.
- https://codesandbox.io/s/react-router-basic-49ki1?fontsize=14&hidenavigation=1&theme=dark
Result should be:
Initial look:

After navigation:

Answers (2)
Ok, seems like we don't clear the RTE instance in the destroy method... I'll fix it for the next release
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.
Issue #1941
[BUG]: When dragging a block over the canvas, JS in script, is appended in canvas before dropping the block.
You're submitting a BUG Are you using the latest release (older versions are NOT supported)? v0.14.57 Are you facing the bug with your loca...
Issue #2722
[BUG] Highlight and toolbar positioned wrong on outside scroll
Are you using the latest release (older versions are NOT supported)? Yes Are you facing the bug with your local copy of GrapesJS or with th...
Issue #1411
Manual triggering of the asset manager rendering is required after opening the AM pop-up
Questions Q: Are you using the latest release (older versions are NOT supported)? A: Yes Q. Are you facing the bug with your local copy of...
Issue #2272
[BUG] `textable` component disappears with custom RTE
Are you using the latest release (older versions are NOT supported)? YesAre you facing the bug with your local copy of GrapesJS or with the...
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.