mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 05:58:46 +02:00
N°2629 Allow user to choose default expanded/collapsed toolbar for richtext editors
This commit is contained in:
@@ -103,11 +103,14 @@ class ConsoleSimpleFieldRenderer extends FieldRenderer
|
||||
// Some additional stuff if we are displaying it with a rich editor
|
||||
if ($bRichEditor)
|
||||
{
|
||||
$sEditorLanguage = strtolower(trim(UserRights::GetUserLanguage()));
|
||||
$aConfig = utils::GetCkeditorPref();
|
||||
$aConfig['extraPlugins'] = 'codesnippet';
|
||||
$sJsConfig = json_encode($aConfig);
|
||||
|
||||
$oOutput->AddJs(
|
||||
<<<EOF
|
||||
$('#{$this->oField->GetGlobalId()}').addClass('htmlEditor');
|
||||
$('#{$this->oField->GetGlobalId()}').ckeditor(function(){}, {language: '$sEditorLanguage', contentsLanguage: '$sEditorLanguage', extraPlugins: 'codesnippet'});
|
||||
$('#{$this->oField->GetGlobalId()}').ckeditor(function(){}, $sJsConfig);
|
||||
EOF
|
||||
);
|
||||
if (($this->oField->GetObject() !== null) && ($this->oField->GetTransactionId() !== null))
|
||||
|
||||
Reference in New Issue
Block a user