mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 14:28:45 +01:00
allow better config options for spell checking in ckeditor (add BrowserBased only)
This commit is contained in:
parent
9006939914
commit
4ef692332f
@ -113,6 +113,7 @@
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="True"{selected_enabled_spellcheck_True}>{lang_Yes}</option>
|
||||
<option value="YesNoSCAYT"{selected_enabled_spellcheck_YesNoSCAYT}>{lang_Yes,_but_no_SCAYT}</option>
|
||||
<option value="YesBrowserBased"{selected_enabled_spellcheck_YesBrowserBased}>{lang_Yes,_use_browser_based_spell_checking_engine}</option>
|
||||
<option value="YesUseWebSpellCheck"{selected_enabled_spellcheck_YesUseWebSpellCheck}>{lang_Yes,_use_WebSpellChecker}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
@ -238,28 +238,31 @@ class egw_ckeditor_config
|
||||
private static function add_spellchecker_options(&$config, &$spellchecker_button, &$scayt_button)
|
||||
{
|
||||
//error_log(__METHOD__.__LINE__.' Spellcheck:'.$GLOBALS['egw_info']['server']['enabled_spellcheck']);
|
||||
if (isset($GLOBALS['egw_info']['server']['enabled_spellcheck']))
|
||||
if (isset($GLOBALS['egw_info']['server']['enabled_spellcheck']) && $GLOBALS['egw_info']['server']['enabled_spellcheck'])
|
||||
{
|
||||
// enable browsers native spellchecker as default, if e.g.: aspell fails
|
||||
// to use browsers native spellchecker, you have to hold CMD/CTRL button on rightclick to
|
||||
// access the browsers spell correction options
|
||||
$config['disableNativeSpellChecker'] = false;
|
||||
if ($GLOBALS['egw_info']['server']['enabled_spellcheck']!='YesNoSCAYT') $config['disableNativeSpellChecker'] = false;
|
||||
$spellchecker_button = 'SpellChecker';
|
||||
if (!empty($GLOBALS['egw_info']['server']['aspell_path']) &&
|
||||
is_executable($GLOBALS['egw_info']['server']['aspell_path']) &&
|
||||
!($GLOBALS['egw_info']['server']['enabled_spellcheck']=='YesUseWebSpellCheck')
|
||||
($GLOBALS['egw_info']['server']['enabled_spellcheck']!='YesUseWebSpellCheck' &&
|
||||
$GLOBALS['egw_info']['server']['enabled_spellcheck']!='YesBrowserBased')
|
||||
)
|
||||
{
|
||||
$spellchecker_button = 'SpellCheck';
|
||||
$config['extraPlugins'] = "aspell";
|
||||
}
|
||||
if (!($GLOBALS['egw_info']['server']['enabled_spellcheck']=='YesNoSCAYT'))
|
||||
if ($GLOBALS['egw_info']['server']['enabled_spellcheck']!='YesNoSCAYT' &&
|
||||
$GLOBALS['egw_info']['server']['enabled_spellcheck']!='YesBrowserBased'
|
||||
)
|
||||
{
|
||||
$scayt_button='Scayt';
|
||||
$config['scayt_autoStartup'] = true;
|
||||
$config['scayt_sLang'] = self::get_lang().'_'.self::get_country();
|
||||
$config['disableNativeSpellChecker'] = true; // only one spell as you type
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user