From 3da347a7838381d8482d6e9cac42c75a9e47f5a1 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 19 Jan 2015 12:30:28 -0800 Subject: [PATCH] docs: The editing commands --- docs/api/browser-window.md | 46 +++++++++++++++++++++++++++++++++++++- docs/api/web-view-tag.md | 44 ++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 1 deletion(-) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 3a838a6cfeba..3525631b1d98 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -743,7 +743,51 @@ Injects CSS into this page. * `code` String -Evaluate `code` in page. +Evaluates `code` in page. + +### WebContents.undo() + +Executes editing command `undo` in page. + +### WebContents.redo() + +Executes editing command `redo` in page. + +### WebContents.cut() + +Executes editing command `cut` in page. + +### WebContents.copy() + +Executes editing command `copy` in page. + +### WebContents.paste() + +Executes editing command `paste` in page. + +### WebContents.delete() + +Executes editing command `delete` in page. + +### WebContents.selectAll() + +Executes editing command `selectAll` in page. + +### WebContents.unselect() + +Executes editing command `unselect` in page. + +### WebContents.replace(text) + +* `text` String + +Executes editing command `replace` in page. + +### WebContents.replaceMisspelling(text) + +* `text` String + +Executes editing command `replaceMisspelling` in page. ### WebContents.send(channel[, args...]) diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 459e734ca597..40ccf1f174a6 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -219,6 +219,50 @@ Closes the devtools window of guest page. Returns whether guest page has a devtools window attached. +### ``.undo() + +Executes editing command `undo` in page. + +### ``.redo() + +Executes editing command `redo` in page. + +### ``.cut() + +Executes editing command `cut` in page. + +### ``.copy() + +Executes editing command `copy` in page. + +### ``.paste() + +Executes editing command `paste` in page. + +### ``.delete() + +Executes editing command `delete` in page. + +### ``.selectAll() + +Executes editing command `selectAll` in page. + +### ``.unselect() + +Executes editing command `unselect` in page. + +### ``.replace(text) + +* `text` String + +Executes editing command `replace` in page. + +### ``.replaceMisspelling(text) + +* `text` String + +Executes editing command `replaceMisspelling` in page. + ### ``.send(channel[, args...]) * `channel` String