mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Browser: Implement pasting Web data to the clipboard
This commit is contained in:
parent
306850652f
commit
9421ffd4ec
Notes:
sideshowbarker
2024-07-17 02:39:10 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/9421ffd4ec Pull-request: https://github.com/SerenityOS/serenity/pull/21878
1 changed files with 4 additions and 0 deletions
|
@ -620,6 +620,10 @@ Tab::Tab(BrowserWindow& window)
|
|||
on_tab_close_request(*this);
|
||||
};
|
||||
|
||||
view().on_insert_clipboard_entry = [](auto const& data, auto const&, auto const& mime_type) {
|
||||
GUI::Clipboard::the().set_data(data.bytes(), mime_type.to_deprecated_string());
|
||||
};
|
||||
|
||||
m_tab_context_menu = GUI::Menu::construct();
|
||||
m_tab_context_menu->add_action(GUI::CommonActions::make_reload_action([this](auto&) {
|
||||
reload();
|
||||
|
|
Loading…
Reference in a new issue