Merge pull request #1701 from CharlieHess/paste-and-match-style

Paste and Match Style
This commit is contained in:
Cheng Zhao 2015-05-20 23:12:46 +08:00
commit dbecc8d5f5
5 changed files with 15 additions and 0 deletions

View file

@ -540,6 +540,10 @@ void WebContents::Paste() {
web_contents()->Paste(); web_contents()->Paste();
} }
void WebContents::PasteAndMatchStyle() {
web_contents()->PasteAndMatchStyle();
}
void WebContents::Delete() { void WebContents::Delete() {
web_contents()->Delete(); web_contents()->Delete();
} }
@ -662,6 +666,7 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder(
.SetMethod("cut", &WebContents::Cut) .SetMethod("cut", &WebContents::Cut)
.SetMethod("copy", &WebContents::Copy) .SetMethod("copy", &WebContents::Copy)
.SetMethod("paste", &WebContents::Paste) .SetMethod("paste", &WebContents::Paste)
.SetMethod("pasteAndMatchStyle", &WebContents::PasteAndMatchStyle)
.SetMethod("delete", &WebContents::Delete) .SetMethod("delete", &WebContents::Delete)
.SetMethod("selectAll", &WebContents::SelectAll) .SetMethod("selectAll", &WebContents::SelectAll)
.SetMethod("unselect", &WebContents::Unselect) .SetMethod("unselect", &WebContents::Unselect)

View file

@ -77,6 +77,7 @@ class WebContents : public mate::EventEmitter,
void Cut(); void Cut();
void Copy(); void Copy();
void Paste(); void Paste();
void PasteAndMatchStyle();
void Delete(); void Delete();
void SelectAll(); void SelectAll();
void Unselect(); void Unselect();

View file

@ -261,6 +261,7 @@ registerWebViewElement = ->
"cut" "cut"
"copy" "copy"
"paste" "paste"
"pasteAndMatchStyle"
"delete" "delete"
"selectAll" "selectAll"
"unselect" "unselect"

View file

@ -854,6 +854,10 @@ Executes editing command `copy` in page.
Executes editing command `paste` in page. Executes editing command `paste` in page.
### WebContents.pasteAndMatchStyle()
Executes editing command `pasteAndMatchStyle` in page.
### WebContents.delete() ### WebContents.delete()
Executes editing command `delete` in page. Executes editing command `delete` in page.

View file

@ -254,6 +254,10 @@ Executes editing command `copy` in page.
Executes editing command `paste` in page. Executes editing command `paste` in page.
### `<webview>`.pasteAndMatchStyle()
Executes editing command `pasteAndMatchStyle` in page.
### `<webview>`.delete() ### `<webview>`.delete()
Executes editing command `delete` in page. Executes editing command `delete` in page.