[evolution] Composer: Asks for format change on Plain Text draft open



commit 7d5dbf03d9a477f959060a757c90b14b1c188532
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jun 5 09:19:24 2020 +0200

    Composer: Asks for format change on Plain Text draft open
    
    The composer asked for format change from HTML to Plain Text when
    opening Plain Text draft message, due to missing attribute in the draft.

 data/webkit/e-editor.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/data/webkit/e-editor.js b/data/webkit/e-editor.js
index 61dba68c94..1419b1558e 100644
--- a/data/webkit/e-editor.js
+++ b/data/webkit/e-editor.js
@@ -2713,9 +2713,11 @@ EvoEditor.GetContent = function(flags, cid_uid_prefix)
                if ((flags & EvoEditor.E_CONTENT_EDITOR_GET_RAW_DRAFT) != 0) {
                        document.head.setAttribute("x-evo-selection", 
EvoSelection.ToString(EvoSelection.Store(document)));
                        try {
-                               content_data["raw-draft"] = document.documentElement.innerHTML;
+                               document.body.setAttribute("data-evo-draft", "");
+                               content_data["raw-draft"] = document.documentElement.outerHTML;
                        } finally {
                                document.head.removeAttribute("x-evo-selection");
+                               document.body.removeAttribute("data-evo-draft");
                        }
                }
 


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