Issue #2508πŸ’¬ AnsweredOpened January 14, 2020by alexiswbr1 reactions

Draggable property added in the final HTML text components

Quick answerby artf❀ 1

Ok I'll try to check this out

Read full answer below ↓

Question

This bug is also on the online demo : https://grapesjs.com/demo.htmlAdd a Text Block to the page, start typing and hiting enter to make several break lines.Unselect the block.Double click on the block to start editing again. Now if you click on the "view code" button, you will see that the HTML nodes inside the Text Block have some draggable="true attributes. This always occure at step three. The first time you edit the text and add break lines, everything is fine, as long as you do not want to edit the block again later. The problem is, in the final HTML displayed on a website, these attribu...

Answers (3)

artfβ€’ January 18, 2020

Ok I'll try to check this out

pouyamiralayiβ€’ January 14, 2020

@alexiswbr using the below snippet, the `div's will become br`'s as the expected behaviour:

obrazkowβ€’ January 14, 2020

I use such way to prevent transformation to component and keep original html. Just override component that you need, for example text or create new. Maybe it's not good solution, but it works :)

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

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.