-
Notifications
You must be signed in to change notification settings - Fork 2.1k
HTML Copy + Paste should support pasted code #1042
Copy link
Copy link
Closed
Description
Currently, code pasted from VS Code (probably other editors) gets put all on a single line, since the default HTML transformers just ignores divs.
example:
<meta charset='utf-8'><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: Menlo, Monaco, 'Courier New', monospace;font-weight: normal;font-size: 12px;line-height: 18px;white-space: pre;"><div><span style="color: #c586c0;">import</span><span style="color: #d4d4d4;"> </span><span style="color: #c586c0;">type</span><span style="color: #d4d4d4;"> {</span><span style="color: #9cdcfe;">InputEvents</span><span style="color: #d4d4d4;">} </span><span style="color: #c586c0;">from</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">'outline-react/useOutlineEditorEvents'</span><span style="color: #d4d4d4;">;</span></div><div><span style="color: #c586c0;">import</span><span style="color: #d4d4d4;"> </span><span style="color: #c586c0;">type</span><span style="color: #d4d4d4;"> {</span></div><div><span style="color: #d4d4d4;"></span></div></div>
We might want to handle this by putting breaking each div onto a new line, either in the Playground of in the default HTML transformers.
Could need something like #948 to work. @fantactuka also experimented with adding an appendAfter to the DOMTransformOutput in #1036 , which might also work..
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels