Open moy2010 opened 1 year ago
I'm curious which application produces such format?
@fantactuka, I copied this from the terminal (nano .gitconfig
), so it's either bash or nano that creates this structure.
For the associated PR, my first line of thought was that Any plain text should be allowed to be copied into a CodeNode
, so I wanted to make the logic in clipboard.ts
aware of its context. But after I followed the logic, I found out that the nodes were coming from the transformers found on the importDOM
methods (That and that a previous PR was rejected because I was importing CodeNode
and all of its baggage into clipboard.ts
:smile:).
As for determining the html structure, I pasted it into GMails body and inspected the resulting html.
When code text that doesn't follow the existing covered cases (i.e. importing a
code
html element or adiv
element with amonospace
font-family) is pasted, the code block is replaced by a paragraph.Here's an example of html with a format that isn't covered:
Lexical version: 0.8.0
Steps To Reproduce
The current behavior
The copied text is transformed into a paragraph, and the code block is removed.
The expected behavior
The copied text is pasted into the code block