From c9bd20fa1c8b22f6b0ff2d1d0de59335db0c6b83 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 23 Feb 2015 15:45:36 +0000 Subject: [PATCH] Switch always compose body to plain text for mobile devices, because ATM CKEditor is not compatible enough to support --- mail/inc/class.mail_compose.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 0c80eb46b9..5c041ac2cc 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -244,6 +244,17 @@ class mail_compose { list($_content['mailaccount'], $_content['mailidentity']) = explode(':', $_content['mailaccount']); } + + // As CKEditor is not available for mobile devices + // we should always switch the compose mimeType to plainText and + // disable the html option + // TODO: After CKEditor complatibility with all devices, this part needs to be removed + if (html::$ua_mobile) + { + $_content['mimeType'] = 'plain'; + $readonlys['mimeType'] = true; + } + //error_log(__METHOD__.__LINE__.array2string($sigPref)); //lang('compose'),lang('from') // needed to be found by translationtools //error_log(__METHOD__.__LINE__.array2string($_REQUEST).function_backtrace());