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

View file

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

View file

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

View file

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

View file

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