Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(clipboard): copy/cut/paste
  • Loading branch information
h13i32maru committed Sep 2, 2018
1 parent 7219ab5 commit 4e7388e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/BrowserViewProxy.js
Expand Up @@ -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();
}
Expand Down
3 changes: 1 addition & 2 deletions src/Electron/Component/BrowserViewComponent.js
Expand Up @@ -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);
}
}));

Expand Down

0 comments on commit 4e7388e

Please sign in to comment.