Commit 37439d2d authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1576643 - Enabled tinyMCE on mobile devices"

parents ea8aec10 4616ac02
...@@ -4023,7 +4023,7 @@ function is_html_editor_enabled () { ...@@ -4023,7 +4023,7 @@ function is_html_editor_enabled () {
return ( return (
(!get_config('wysiwyg') && $USER->get_account_preference('wysiwyg')) || (!get_config('wysiwyg') && $USER->get_account_preference('wysiwyg')) ||
(get_config('wysiwyg') == 'enable' && $USER->is_logged_in()) (get_config('wysiwyg') == 'enable' && $USER->is_logged_in())
) && $SESSION->get('handheld_device') == false; );
} }
/** /**
......
...@@ -212,7 +212,7 @@ function smarty($javascript = array(), $headers = array(), $pagestrings = array( ...@@ -212,7 +212,7 @@ function smarty($javascript = array(), $headers = array(), $pagestrings = array(
// Note: we do not display tinyMCE for mobile devices // Note: we do not display tinyMCE for mobile devices
// as it doesn't work on some of them and can // as it doesn't work on some of them and can
// disable the editing of a textarea field // disable the editing of a textarea field
if ($SESSION->get('handheld_device') == false) { if (is_html_editor_enabled()) {
$checkarray = array(&$javascript, &$headers); $checkarray = array(&$javascript, &$headers);
$found_tinymce = false; $found_tinymce = false;
foreach ($checkarray as &$check) { foreach ($checkarray as &$check) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment