aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-html-editor-view.c
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-07-30 18:56:38 +0800
committerTomas Popela <tpopela@redhat.com>2014-07-30 18:59:54 +0800
commit0ffb259cf8d24afdf4fa1f296e36773610226b8f (patch)
tree88ab5b6e876960e420a4357870304f3fa562de4c /e-util/e-html-editor-view.c
parent14446c79e895c3757dd20d675cd0cbb70d8eadda (diff)
downloadgsoc2013-evolution-0ffb259cf8d24afdf4fa1f296e36773610226b8f.tar
gsoc2013-evolution-0ffb259cf8d24afdf4fa1f296e36773610226b8f.tar.gz
gsoc2013-evolution-0ffb259cf8d24afdf4fa1f296e36773610226b8f.tar.bz2
gsoc2013-evolution-0ffb259cf8d24afdf4fa1f296e36773610226b8f.tar.lz
gsoc2013-evolution-0ffb259cf8d24afdf4fa1f296e36773610226b8f.tar.xz
gsoc2013-evolution-0ffb259cf8d24afdf4fa1f296e36773610226b8f.tar.zst
gsoc2013-evolution-0ffb259cf8d24afdf4fa1f296e36773610226b8f.zip
EHTMLEditorView - Wrap just paragraphs that are not in the quoted content
Paragraphs in the quoted content are already wrapped, so we were just waisting the time there.
Diffstat (limited to 'e-util/e-html-editor-view.c')
-rw-r--r--e-util/e-html-editor-view.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 132d6cbf6b..bf1c3b5c16 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -6183,6 +6183,7 @@ convert_element_from_html_to_plain_text (EHTMLEditorView *view,
static gchar *
process_content_for_plain_text (EHTMLEditorView *view)
{
+ EHTMLEditorSelection *selection;
gboolean converted, wrap = FALSE, quote = FALSE, clean = FALSE;
gint length, ii;
GString *plain_text;
@@ -6198,6 +6199,8 @@ process_content_for_plain_text (EHTMLEditorView *view)
WEBKIT_DOM_ELEMENT (body), "data-converted");
source = webkit_dom_node_clone_node (WEBKIT_DOM_NODE (body), TRUE);
+ selection = e_html_editor_view_get_selection (view);
+
/* If composer is in HTML mode we have to move the content to plain version */
if (view->priv->html_mode) {
if (converted) {
@@ -6246,7 +6249,7 @@ process_content_for_plain_text (EHTMLEditorView *view)
}
paragraphs = webkit_dom_element_query_selector_all (
- WEBKIT_DOM_ELEMENT (source), ".-x-evo-paragraph", NULL);
+ WEBKIT_DOM_ELEMENT (source), "body > .-x-evo-paragraph", NULL);
length = webkit_dom_node_list_get_length (paragraphs);
for (ii = 0; ii < length; ii++) {
@@ -6264,15 +6267,13 @@ process_content_for_plain_text (EHTMLEditorView *view)
if (WEBKIT_DOM_IS_HTMLLI_ELEMENT (item)) {
e_html_editor_selection_wrap_paragraph (
- e_html_editor_view_get_selection (view),
- WEBKIT_DOM_ELEMENT (item));
+ selection, WEBKIT_DOM_ELEMENT (item));
}
item = next_item;
}
} else {
e_html_editor_selection_wrap_paragraph (
- e_html_editor_view_get_selection (view),
- WEBKIT_DOM_ELEMENT (paragraph));
+ selection, WEBKIT_DOM_ELEMENT (paragraph));
}
}