From f7b2bfba092213af2f7101b18b96e957cbe0b217 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 21 Sep 2013 11:24:16 +0200 Subject: 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 file changed, 7 insertions(+), 3 deletions(-) (limited to 'program/js/editor.js') diff --git a/program/js/editor.js b/program/js/editor.js index e1ef36835..6d7b9538a 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -74,14 +74,18 @@ function rcmail_editor_init(config) // 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); -- cgit v1.2.3