BUG: textnode is not removed from canvas
Question
Text imported directly to the wrapper is not removed from the canvas with the component.
To verify one can import simple texts multiple times to the demo and watch how they combine instead of replacing the previous one.
Adding this seems to help:
editor.DomComponents.addType('textnode', {
model: {
removed() {
var el = this.getEl();
el.parentNode.removeChild(el);
}
}
});
Tested with the demo v0.16.18.Answers (3)
I don't follow your example, can you illustrate exact steps to reproduce, please?
Go to the newsletter demo at https://grapesjs.com/demo-newsletter-editor.html and use the "Import template" function with simple text like "hello" but no html (or combine it with html and text on the root level). Repeat this and the text on the root level will not be removed but add up on each import.
Thanks @neon12345, I was able to find the issue and it should be fixed in the next release
Related Questions and Answers
Continue research with similar issue discussions.
Issue #463
Is the video component on the webpage demo working?
I wanted to study how to use the video component but the one on the demo website (http://grapesjs.com/demo.html) doesn't seem to be working...
Issue #3579
BUG: RTE misplaced when opened right after dropping `activeOnRender` component
Version: 0.17.4 Are you able to reproduce the bug from the demo?[x] Yes[ ] No Steps to reproduce:Go to the demoDrop a "Text" block inside t...
Issue #2800
[Bug] when removing a tooltip its css is not removed
DescriptionThe bug is reproduced on the current demo Expected behavior When a tooltip is removed its css is removed What happens instead ?...
Issue #2882
BUG: Problem with adding caption element block to the canvas
Version: 0.16.18 Are you able to reproduce the bug from the demo? [x ] Yes https://jsfiddle.net/triawarman/tmcoqxhp/ What is the expected b...
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.