Parse single nodetext as component
No community answers yet. Open the original discussion on GitHub to share your solution.
Question
Version: current
Are you able to reproduce the bug from the demo?
[X ] Yes [ ] No
What is the expected behavior? The single textnode in any component (e.g. text, cell, ...) should be parsed as a textnode component.
What is the current behavior? Currently, a single textnode in a component is parsed as only a content in htmlParser. When, you call the components method on the child, it returns models as empty array and does not consider textnode as a component.
Are you able to attach screenshots, screencasts or a live demo? In this demo, I some of the cells have only one text node. if you only select two cell in one row and try to merge them, since the models of the component is empty, it returns empty string. single textnode childs should be parsed as a textnode component. in this demo, you can try to merge last row (text1 with text2) and it fails. Demo
Answers (0)
No answers yet.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3681
Textable not working with extended text component
Version: 0.17.22 Are you able to reproduce the bug from the demo?[X] Yes[ ] No What is the expected behavior? Should be able to drop a text...
Issue #3301
Change one copied element affects other copied elements
Version:0.16.41 Are you able to reproduce the bug from the demo? Yes What is the expected behavior? When I'm copying/pasting elements (e.g....
Issue #3131
Paste as plain text into Text component adds <font /> wrapper to pasted text
Version: 0.16.27 Are you able to reproduce the bug from the demo? [] Yes [X] No What is the expected behavior? Paste as plain text (text no...
Issue #3352
Default Content is getting Inserted while using setComponents if Tag Body is empty
Version: Latest You can get the version by typing grapesjs.version into the console Are you able to reproduce the bug from the demo?[X] Yes...
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 →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.