[evolution/wip/webkit2] EHTMLEditorView - Pasting content into the indented block will not preserve formatting
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] EHTMLEditorView - Pasting content into the indented block will not preserve formatting
- Date: Wed, 29 Jun 2016 15:08:00 +0000 (UTC)
commit 29437c1c082abfc68952713d030ef604d2a4c343
Author: Tomas Popela <tpopela redhat com>
Date: Wed Jun 29 17:00:22 2016 +0200
EHTMLEditorView - Pasting content into the indented block will not preserve formatting
Before this change it would insert a new unindented block instead of continuing
with the indented one.
.../web-extension/e-editor-dom-functions.c | 3 ++-
1 files changed, 2 insertions(+), 1 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 6d00044..0ba9d50 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -6564,7 +6564,8 @@ e_editor_dom_convert_and_insert_html_into_selection (EEditorPage *editor_page,
clone1 = webkit_dom_node_clone_node_with_error (WEBKIT_DOM_NODE (block), FALSE, NULL);
clone2 = webkit_dom_node_clone_node_with_error (WEBKIT_DOM_NODE (parent), FALSE, NULL);
if (webkit_dom_node_is_equal_node (clone1, clone2) ||
- (WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone1) && WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone2))) {
+ (WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone1) && WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone2) &&
+ !element_has_class (WEBKIT_DOM_ELEMENT (clone2), "-x-evo-indented"))) {
fix_structure_after_pasting_multiline_content (block);
if (g_strcmp0 (html, "\n") == 0) {
WebKitDOMElement *br;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]