mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Add bookmark key to clipboard.write
This commit is contained in:
@@ -54,12 +54,16 @@ std::string Read(const std::string& format_string,
|
||||
void Write(const mate::Dictionary& data,
|
||||
mate::Arguments* args) {
|
||||
ui::ScopedClipboardWriter writer(GetClipboardType(args));
|
||||
base::string16 text, html;
|
||||
base::string16 text, html, bookmark;
|
||||
gfx::Image image;
|
||||
|
||||
if (data.Get("text", &text))
|
||||
if (data.Get("text", &text)) {
|
||||
writer.WriteText(text);
|
||||
|
||||
if (data.Get("bookmark", &bookmark))
|
||||
writer.WriteBookmark(bookmark, base::UTF16ToUTF8(text));
|
||||
}
|
||||
|
||||
if (data.Get("rtf", &text)) {
|
||||
std::string rtf = base::UTF16ToUTF8(text);
|
||||
writer.WriteRTF(rtf);
|
||||
|
||||
Reference in New Issue
Block a user