|
|
|
@ -10,4 +10,70 @@ namespace Chamilo\CoreBundle\Component\Editor\CkEditor\Toolbar; |
|
|
|
|
*/ |
|
|
|
|
class SurveyQuestion extends Basic |
|
|
|
|
{ |
|
|
|
|
/** |
|
|
|
|
* Get the toolbar config. |
|
|
|
|
* |
|
|
|
|
* @return array |
|
|
|
|
*/ |
|
|
|
|
public function getConfig() |
|
|
|
|
{ |
|
|
|
|
if (api_get_setting('more_buttons_maximized_mode') != 'true') { |
|
|
|
|
$config['toolbar'] = $this->getNormalToolbar(); |
|
|
|
|
} else { |
|
|
|
|
$config['toolbar_minToolbar'] = $this->getMinimizedToolbar(); |
|
|
|
|
$config['toolbar_maxToolbar'] = $this->getMaximizedToolbar(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $config; |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* Get the toolbar configuration when CKEditor is maximized. |
|
|
|
|
* |
|
|
|
|
* @return array |
|
|
|
|
*/ |
|
|
|
|
protected function getMaximizedToolbar() |
|
|
|
|
{ |
|
|
|
|
return [ |
|
|
|
|
$this->getNewPageBlock(), |
|
|
|
|
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', 'inserthtml'], |
|
|
|
|
['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'], |
|
|
|
|
['Link', 'Unlink', 'Anchor', 'Glossary'], |
|
|
|
|
[ |
|
|
|
|
'Image', |
|
|
|
|
'Mapping', |
|
|
|
|
'Video', |
|
|
|
|
'Oembed', |
|
|
|
|
'Flash', |
|
|
|
|
'Youtube', |
|
|
|
|
'Audio', |
|
|
|
|
'leaflet', |
|
|
|
|
'Smiley', |
|
|
|
|
'SpecialChar', |
|
|
|
|
'Asciimath', |
|
|
|
|
'Asciisvg', |
|
|
|
|
], |
|
|
|
|
'/', |
|
|
|
|
['Table', '-', 'CreateDiv'], |
|
|
|
|
['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'], |
|
|
|
|
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], |
|
|
|
|
[ |
|
|
|
|
'Bold', |
|
|
|
|
'Italic', |
|
|
|
|
'Underline', |
|
|
|
|
'Strike', |
|
|
|
|
'-', |
|
|
|
|
'Subscript', |
|
|
|
|
'Superscript', |
|
|
|
|
'-', |
|
|
|
|
'TextColor', |
|
|
|
|
'BGColor', |
|
|
|
|
api_get_configuration_value('translate_html') ? 'Language' : '', |
|
|
|
|
], |
|
|
|
|
[api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''], |
|
|
|
|
['Styles', 'Format', 'Font', 'FontSize'], |
|
|
|
|
['PageBreak', 'ShowBlocks'], |
|
|
|
|
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''], |
|
|
|
|
['Toolbarswitch', 'Source'], |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|