aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-html-editor-view.c
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-07-01 21:09:31 +0800
committerTomas Popela <tpopela@redhat.com>2014-07-01 21:09:31 +0800
commit9b5c2022d7d8921084e0e29f966bd4d384cc5cea (patch)
tree09bbf3406516c6974634e44a7c03f45747605756 /e-util/e-html-editor-view.c
parentf477af8b2efca7139375caf3b57918a98417135a (diff)
downloadgsoc2013-evolution-9b5c2022d7d8921084e0e29f966bd4d384cc5cea.tar
gsoc2013-evolution-9b5c2022d7d8921084e0e29f966bd4d384cc5cea.tar.gz
gsoc2013-evolution-9b5c2022d7d8921084e0e29f966bd4d384cc5cea.tar.bz2
gsoc2013-evolution-9b5c2022d7d8921084e0e29f966bd4d384cc5cea.tar.lz
gsoc2013-evolution-9b5c2022d7d8921084e0e29f966bd4d384cc5cea.tar.xz
gsoc2013-evolution-9b5c2022d7d8921084e0e29f966bd4d384cc5cea.tar.zst
gsoc2013-evolution-9b5c2022d7d8921084e0e29f966bd4d384cc5cea.zip
EHTMLEditorView - Create new paragraph in body if body is empty and save caret there
Diffstat (limited to 'e-util/e-html-editor-view.c')
-rw-r--r--e-util/e-html-editor-view.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 5ca0dc0204..8039a5ce52 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -3872,6 +3872,14 @@ html_editor_view_process_document_from_convertor (EHTMLEditorView *view,
first_child = webkit_dom_node_get_first_child (
WEBKIT_DOM_NODE (body));
+ if (!first_child) {
+ paragraph = e_html_editor_selection_get_paragraph_element (
+ selection, document, -1, 0);
+ first_child = webkit_dom_node_append_child (
+ WEBKIT_DOM_NODE (body),
+ WEBKIT_DOM_NODE (paragraph),
+ NULL);
+ }
webkit_dom_node_insert_before (
first_child,