Pasting from a different copy behavior result in a different rendering #5230
Unanswered
cnicodeme
asked this question in
Questions & Help
Replies: 1 comment
-
Update, I just tested on https://templates.tiptap.dev/DH8WK7KG6N It doesn't block nor make all in one line, but it does handle the rendering differently between "select+copy" and "button+copy" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I have a odd situation.
On Linear, I have a ticket with a code present.
If I select the code (JSON) and paste on Tiptap, the CodeBlockLowLight renders it, but in the same time makes that pasted element non-editable (tag
contenteditable="false"
).If, instead, I click on the "copy" icon in the right, and paste it on Tiptap, the pasted element is a standard
<p>
, that can be edited.What's even weirder is that the paste event only difference is that the "select+copy" contains html AND text in format, and the "copy button" only contains text.
Here's a sample that works (it's the same code I tested at from Linear, I'm hoping it will work on Github):
(Nothing fancy).
If I set up the following code for debugging purpose on the page having Tiptap:
Here's the result:
For "Select+Copy":
With "Button copy":
Why that difference in behavior ? Where is this defined ? And why the
pre
element when "select+copy" hascontenteditable="false"
set ?(And bonus question: why the rendering is properly colored, but all in one line ?)
Beta Was this translation helpful? Give feedback.
All reactions