From b5d682209bd8394c4fcccd6f2dd84ad53143a60c Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Wed, 25 Jun 2014 14:13:39 +0200 Subject: Bug 731508 - [webkit-composer] no option to paste as text (without formatting) --- e-util/e-html-editor-selection.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'e-util/e-html-editor-selection.c') diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c index 4db05b4730..bc0d6f4bf6 100644 --- a/e-util/e-html-editor-selection.c +++ b/e-util/e-html-editor-selection.c @@ -3943,6 +3943,22 @@ e_html_editor_selection_insert_html (EHTMLEditorSelection *selection, g_object_unref (view); } +void +e_html_editor_selection_insert_as_text (EHTMLEditorSelection *selection, + const gchar *html_text) +{ + EHTMLEditorView *view; + + g_return_if_fail (E_IS_HTML_EDITOR_SELECTION (selection)); + g_return_if_fail (html_text != NULL); + + view = e_html_editor_selection_ref_html_editor_view (selection); + g_return_if_fail (view != NULL); + + e_html_editor_view_convert_and_insert_html_to_plain_text (view, html_text); + + g_object_unref (view); +} /************************* image_load_and_insert_async() *************************/ -- cgit v1.2.3