[evolution] e-editor.js: EvoEditor.LoadHTML: Preserve theme CSS



commit e913552a59f5df94b4f278832c1f167bace53e77
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jun 5 09:32:32 2020 +0200

    e-editor.js: EvoEditor.LoadHTML: Preserve theme CSS
    
    To preserve the look as the theme defines it.

 data/webkit/e-editor.js | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/data/webkit/e-editor.js b/data/webkit/e-editor.js
index 1419b1558e..898a309a18 100644
--- a/data/webkit/e-editor.js
+++ b/data/webkit/e-editor.js
@@ -5754,10 +5754,15 @@ EvoEditor.LoadHTML = function(html)
 {
        EvoUndoRedo.Disable();
        try {
+               var themeCss = EvoEditor.UpdateThemeStyleSheet(null);
+
                document.documentElement.innerHTML = html;
 
                EvoEditor.processLoadedContent();
                EvoEditor.initializeContent();
+
+               if (themeCss)
+                       EvoEditor.UpdateThemeStyleSheet(themeCss);
        } finally {
                EvoUndoRedo.Enable();
                EvoUndoRedo.Clear();


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