How to Prevent <div> Tag from Being Replaced by <p> Tag in Tiptap Editor? #5113
Unanswered
MuttakinHasib
asked this question in
Questions & Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm encountering an issue in the Tiptap editor where
<div>
tags are automatically converted to<p>
tags upon dropping content into the editor. This behavior disrupts the rendering of tables which are encapsulated within these div tags.Problem Description:
I have implemented a drag-and-drop (DnD) feature that allows content to be dragged from a sidebar into the editor canvas. The content being dragged is formatted as follows:
<div>{(render_table)}</div>
. However, once dropped into the editor, the<div>
tag is replaced by a<p>
tag, resulting in the format<p>{(render_table)}</p>
.{(render_table)}
is intended to render a table, but the table fails to render properly when it is wrapped within a<p>
tag.Attached DnD Extension Code:
Questions:
<div>
tags with<p>
tags during drag and drop operations?Thank you in advance for your help and suggestions!
@philippkuehn
Beta Was this translation helpful? Give feedback.
All reactions