N°2629 Allow user to choose default expanded/collapsed toolbar for richtext editors

This commit is contained in:
Stephen Abello
2020-12-04 10:53:22 +01:00
parent cc6e9492fd
commit 13d2699011
9 changed files with 90 additions and 16 deletions

View File

@@ -2471,4 +2471,19 @@ class utils
{
return static::$iNextId++;
}
public static function GetCkeditorPref()
{
$sLanguage = strtolower(trim(UserRights::GetUserLanguage()));
$aDefaultConf = array('language'=> $sLanguage,
'contentsLanguage' => $sLanguage,
'extraPlugins' => 'disabler,codesnippet',
);
$aRichTextConfig = json_decode(appUserPreferences::GetPref('richtext_config', '{}'), true);
return array_merge($aDefaultConf, $aRichTextConfig);
}
}