From f7b2bfba092213af2f7101b18b96e957cbe0b217 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 21 Sep 2013 05:24:16 -0400
Subject: [PATCH] Bring back possibility to unset default font family and font size Fix style attribute quoting when font-family contains double quotes SOme code improvements

---
 program/js/editor.js |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/program/js/editor.js b/program/js/editor.js
index e1ef368..6d7b953 100644
--- a/program/js/editor.js
+++ b/program/js/editor.js
@@ -74,14 +74,18 @@
 // react to real individual tinyMCE editor init
 function rcmail_editor_callback()
 {
-  var elem = rcube_find_object('_from'),
+  var css = {},
+    elem = rcube_find_object('_from'),
     fe = rcmail.env.compose_focus_elem;
 
   if (rcmail.env.default_font)
-    $(tinyMCE.get(rcmail.env.composebody).getBody()).css('font-family', rcmail.env.default_font);
+    css['font-family'] = rcmail.env.default_font;
 
   if (rcmail.env.default_font_size)
-    $(tinyMCE.get(rcmail.env.composebody).getBody()).css('font-size', rcmail.env.default_font_size);
+    css['font-size'] = rcmail.env.default_font_size;
+
+  if (css['font-family'] || css['font-size'])
+    $(tinyMCE.get(rcmail.env.composebody).getBody()).css(css);
 
   if (elem && elem.type == 'select-one') {
     rcmail.change_identity(elem);

--
Gitblit v1.9.1