[evolution] EHTMLEditorView - Create new paragraph in body if body is empty and save caret there
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorView - Create new paragraph in body if body is empty and save caret there
- Date: Tue, 1 Jul 2014 13:20:10 +0000 (UTC)
commit 9b5c2022d7d8921084e0e29f966bd4d384cc5cea
Author: Tomas Popela <tpopela redhat com>
Date: Tue Jul 1 15:09:31 2014 +0200
EHTMLEditorView - Create new paragraph in body if body is empty and save caret there
e-util/e-html-editor-view.c | 8 ++++++++
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 5ca0dc0..8039a5c 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]