From d9436628cd71261ab337446410df3192a8a934e9 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 23 May 2022 15:44:42 +0200 Subject: [PATCH] load users preferred (TinyMCE) font also for mail preview --- mail/inc/class.mail_ui.inc.php | 7 ++++++- mail/templates/default/preview.css | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 02fd481b5e..77b4742642 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -3356,6 +3356,11 @@ $filter['before']= date("d-M-Y", $cutoffdate2); $GLOBALS['egw_info']['flags']['nonavbar']=true; // do NOT include any default CSS Framework::includeCSS('mail', 'preview', true, true); + // include TinyMCE CSS prefs after preview CSS + Framework::includeCSS('/api/tinymce.php?'. // use the 3 prefs as cache-buster + base64_encode($GLOBALS['egw_info']['user']['preferences']['common']['rte_font'].':'. + $GLOBALS['egw_info']['user']['preferences']['common']['rte_font_size'].':'. + $GLOBALS['egw_info']['user']['preferences']['common']['rte_font_unit'])); // load preview.js to activate mailto links Framework::includeJS('/mail/js/preview.js'); @@ -5619,4 +5624,4 @@ $filter['before']= date("d-M-Y", $cutoffdate2); $response->data($res); } } -} +} \ No newline at end of file diff --git a/mail/templates/default/preview.css b/mail/templates/default/preview.css index d35a73c72e..a091883b36 100644 --- a/mail/templates/default/preview.css +++ b/mail/templates/default/preview.css @@ -19,7 +19,7 @@ body,html { height:100%; width:100%; padding:0px; - margin:0px; + margin:0 !important; } .td_display { font-family: Verdana, Arial, Helvetica, sans-serif;