fix(web): paste clipboard text into the TEXT / MText editors

Ctrl+V was globally bound to the entity paste command, so it never pasted
into an open text editor, and even when routed there iced's clipboard read
is a no-op on the web. Route Ctrl+V to the focused editor and, on the web,
read the system clipboard via the browser's async Clipboard API (the
keypress is a user gesture, so the read is permitted):

- MText editor: insert at the caret (web + native).
- TEXT field: append on the web; native lets the text_input paste itself.
- No editor open: falls through to the entity paste command as before.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-20 17:05:02 +03:00
1 parent 54106ca9b0
commit e1c5917644
5 files changed
+77 -1

No files matched your search

+1 -1
View File
@@ -1769,7 +1769,7 @@ impl OpenCADStudio {
"y" => Some(Message::Redo),
"c" => Some(Message::Command("COPYCLIP".to_string())),
"x" => Some(Message::Command("CUTCLIP".to_string())),
"v" => Some(Message::Command("PASTECLIP".to_string())),
"v" => Some(Message::PasteShortcut),
_ => None,
},
// Printable glyphs are already handled by the