summaryrefslogtreecommitdiff
path: root/program/js/editor.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-09-21 11:24:16 +0200
committerAleksander Machniak <alec@alec.pl>2013-09-21 11:24:16 +0200
commitf7b2bfba092213af2f7101b18b96e957cbe0b217 (patch)
tree294af8a00516d41fe4c0989795a9e5d2539c8395 /program/js/editor.js
parenta149d566fca224e503b7676337486ec2670e6cca (diff)
Bring back possibility to unset default font family and font size
Fix style attribute quoting when font-family contains double quotes SOme code improvements
Diffstat (limited to 'program/js/editor.js')
-rw-r--r--program/js/editor.js10
1 files changed, 7 insertions, 3 deletions
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);