penpot/frontend
Andrey Antukh 222322dcb5 🐛 Fix HTML paste never using the pasted HTML structure
The v2-html-paste path was broken since it was introduced. The paste
handler called the formatted/plain dispatcher without the selection
controller, so reading `clipboardData.types` threw on every paste while
the feature was enabled. The HTML branch also never forwarded the
allowHTMLPaste flag to mapContentFragmentFromHTML, and that function
called mapContentFragmentFromDocument() without the root node, so
createNodeIterator() threw and the silent fallback always degraded the
paste to plain text.

Pass the selection controller through the dispatcher, forward the flag
from the formatted fragment helper, and iterate the parsed document from
its body.

AI-assisted-by: longcat-2.0-free
2026-08-08 19:39:34 +00:00
..
2026-06-22 14:35:10 +02:00
2026-05-29 11:24:58 +02:00
2026-08-06 08:55:58 +02:00
2026-04-07 21:35:00 +02:00
2026-07-30 16:56:10 +02:00
2026-07-30 13:05:28 +02:00
2026-07-31 18:53:05 +02:00