From 7e263ea2048721482c00db65d4511f00c4c7b1d4 Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 7 Dec 2011 09:35:29 +0000 Subject: - Add option to set default font for HTML message (#1484137) --- program/js/app.js | 5 +++++ program/js/editor.js | 3 +++ 2 files changed, 8 insertions(+) (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index d2b44344e..b6c7d1dfd 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3048,6 +3048,11 @@ function rcube_webmail() this.display_spellcheck_controls(false); this.plain2html($('#'+props.id).val(), props.id); tinyMCE.execCommand('mceAddControl', false, props.id); + + if (this.env.default_font) + window.setTimeout(function() { + $(tinyMCE.get(props.id).getBody()).css('font-family', rcmail.env.default_font); + }, 500); } else { var thisMCE = tinyMCE.get(props.id), existingHtml; diff --git a/program/js/editor.js b/program/js/editor.js index 9ad50cea5..5e08671f1 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -66,6 +66,9 @@ function rcmail_editor_callback() var 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); + if (elem && elem.type == 'select-one') { rcmail.change_identity(elem); // Focus previously focused element -- cgit v1.2.3