Implement the Edit > Paste menu entry (#683)

Closes #682
This commit is contained in:
Keavon Chambers
2022-06-19 00:53:33 -07:00
parent 5d6d2b22bc
commit fe4a76a395
6 changed files with 105 additions and 23 deletions

View File

@@ -176,8 +176,13 @@ impl PropertyHolder for MenuBarMessageHandler {
action: MenuEntry::create_action(|_| PortfolioMessage::Copy { clipboard: Clipboard::Device }.into()),
..MenuEntry::default()
},
// TODO: Fix this
// { label: "Paste", icon: "Paste", shortcut: ["KeyControl", "KeyV"], action: async (): Promise<void> => editor.instance.paste() },
MenuEntry {
label: "Paste".into(),
icon: Some("Paste".into()),
shortcut: Some(vec![Key::KeyControl, Key::KeyV]),
action: MenuEntry::create_action(|_| FrontendMessage::TriggerPaste.into()),
..MenuEntry::default()
},
],
],
},