[evolution/wip/webkit2] EEditorDOMFunctions - Set data-evo-plain-text on BODY when converting content while switching the co



commit 7859ff0ae05472d7a50711a68b5aad3871c9759e
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Jul 15 14:26:02 2016 +0200

    EEditorDOMFunctions - Set data-evo-plain-text on BODY when converting content while switching the 
composer mode

 .../web-extension/e-editor-dom-functions.c         |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index 1670966..4bc9a25 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -8321,6 +8321,13 @@ e_editor_dom_convert_when_changing_composer_mode (EEditorPage *editor_page)
 
        clear_attributes (editor_page);
 
+       if (!e_editor_page_get_html_mode (editor_page))
+               webkit_dom_element_set_attribute (
+                       WEBKIT_DOM_ELEMENT (body), "data-evo-plain-text", "", NULL);
+       else
+               webkit_dom_element_remove_attribute (
+                       WEBKIT_DOM_ELEMENT (body), "data-evo-plain-text");
+
        e_editor_dom_force_spell_check_in_viewport (editor_page);
        e_editor_dom_scroll_to_caret (editor_page);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]