From 65b52f9e8399e2274fecc1ef22b3c31059a2ed53 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 5 Apr 2015 12:58:23 -0700 Subject: [PATCH] TinyMce browser-spellcheck preference added. --- e107_plugins/tinymce4/admin_config.php | 4 +++- e107_plugins/tinymce4/plugin.xml | 4 ++++ e107_plugins/tinymce4/wysiwyg.php | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/e107_plugins/tinymce4/admin_config.php b/e107_plugins/tinymce4/admin_config.php index 5d5c946f9..3b6659185 100644 --- a/e107_plugins/tinymce4/admin_config.php +++ b/e107_plugins/tinymce4/admin_config.php @@ -56,7 +56,9 @@ if( !e107::isInstalled('tinymce4')) protected $prefs = array( - 'paste_as_text' => array('title'=> 'Paste as text by default', 'type'=>'boolean', 'data' => 'int','help'=> ''), ); + 'paste_as_text' => array('title'=> 'Paste as text by default', 'type'=>'boolean', 'data' => 'int','help'=> ''), + 'browser_spellcheck' => array('title'=> 'Browser spellcheck', 'type'=>'boolean', 'data' => 'int','help'=> 'Enable this if the browser internal spellchecker should be used.'), + ); public function init() diff --git a/e107_plugins/tinymce4/plugin.xml b/e107_plugins/tinymce4/plugin.xml index 8a11cae45..56ba5f1d8 100644 --- a/e107_plugins/tinymce4/plugin.xml +++ b/e107_plugins/tinymce4/plugin.xml @@ -6,4 +6,8 @@ Configure + + 0 + 1 + \ No newline at end of file diff --git a/e107_plugins/tinymce4/wysiwyg.php b/e107_plugins/tinymce4/wysiwyg.php index 521fa22a5..3dd7bdb78 100644 --- a/e107_plugins/tinymce4/wysiwyg.php +++ b/e107_plugins/tinymce4/wysiwyg.php @@ -323,6 +323,14 @@ class wysiwyg $ret['paste_as_text'] = true; } + + if(!empty($tPref['browser_spellcheck'])) + { + $ret['browser_spellcheck'] = true; + } + + + $ret['convert_fonts_to_spans'] = false; $ret['content_css'] = e_PLUGIN_ABS.'tinymce4/editor.css,https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css,http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css';