Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fix(clipboard): copy/cut/paste
- Loading branch information
Showing
with
9 additions
and
2 deletions.
-
+8
−0
src/BrowserViewProxy.js
-
+1
−2
src/Electron/Component/BrowserViewComponent.js
|
@@ -36,6 +36,14 @@ export default class BrowserViewProxy { |
|
|
return this._webContents; |
|
|
} |
|
|
|
|
|
static cut() { |
|
|
this._webContents.cut(); |
|
|
} |
|
|
|
|
|
static paste() { |
|
|
this._webContents.paste(); |
|
|
} |
|
|
|
|
|
static canGoBack() { |
|
|
return this._webContents.canGoBack(); |
|
|
} |
|
|
|
@@ -347,8 +347,7 @@ export default class WebViewComponent extends React.Component { |
|
|
menu.append(new MenuItem({ |
|
|
label: 'Copy text', |
|
|
click: ()=>{ |
|
|
//clipboard.writeText(data.text); |
|
|
webView.copy(); |
|
|
clipboard.writeText(data.text); |
|
|
} |
|
|
})); |
|
|
|
|
|