Issue #2807Opened May 27, 2020by alesub0 reactions

[Bug]: Starting editor "fromElement" creates components inside tag with data-gjs-type="text"

Question

Hi,

I'm currently trying to start the editor "fromElement", setting the following html inside the container:

<p data-gjs-type="text" contenteditable="true">
Lorem asd dolor sit amet consectetur, adipisicing elit. Similique repellat <b>voluptatum</b> 
voluptas ex, esse error sed culpa <i>impedit</i>, <strike>eum amet </strike> laboriosam <strike>. 
Doloribus, maxime fuga eum aliquid non doloremque </strike>soluta quod.
</p>

But when executed, grapesjs creates components inside the <p> tag even after setting the data-gjs-type attribute as text. What I'm trying to do is to present the paragraph to be edited as a single component.

You can see the issue in action here: https://codepen.io/alesub/pen/xxwNaPd

Thanks for this great tool!

Answers (3)

alesubJune 1, 20200 reactions

Hi, any luck reviewing this issue? What got me lost is this doesn't happen on the demo page, any bold or italic text doesn't become a separate component after saving or reloading.

Any insight will be greatly appreciated, 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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.