|
@@ -0,0 +1,124 @@
|
|
|
+<?php
|
|
|
+/* For licensing terms, see /license.txt */
|
|
|
+
|
|
|
+namespace Chamilo\CoreBundle\Component\Editor\CkEditor\Toolbar;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Agenda toolbar configuration
|
|
|
+ *
|
|
|
+ * @package Chamilo\CoreBundle\Component\Editor\CkEditor\Toolbar *
|
|
|
+ */
|
|
|
+class Agenda extends Basic
|
|
|
+{
|
|
|
+
|
|
|
+ public $plugins = array(
|
|
|
+ );
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get the toolbar config
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function getConfig()
|
|
|
+ {
|
|
|
+ if (api_get_setting('editor.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 [
|
|
|
+ ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
|
|
|
+ ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
|
|
|
+ ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
|
|
|
+ ['Link', 'Unlink', 'Anchor', 'Glossary'],
|
|
|
+ [
|
|
|
+ 'Image',
|
|
|
+ 'Mapping',
|
|
|
+ 'Video',
|
|
|
+ 'Flash',
|
|
|
+ 'Youtube',
|
|
|
+ 'Oembed',
|
|
|
+ '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_setting(
|
|
|
+ 'editor.allow_spellcheck'
|
|
|
+ ) == 'true' ? 'Scayt' : '',
|
|
|
+ ],
|
|
|
+ ['Styles', 'Format', 'Font', 'FontSize'],
|
|
|
+ ['PageBreak', 'ShowBlocks'],
|
|
|
+ ['Toolbarswitch'],
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get the default toolbar configuration when the setting more_buttons_maximized_mode is false
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ protected function getNormalToolbar()
|
|
|
+ {
|
|
|
+ return [
|
|
|
+ ['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
|
|
|
+ ['Link', 'Unlink', 'Anchor'],
|
|
|
+ ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
|
|
|
+ ['Table', 'SpecialChar'],
|
|
|
+ '/',
|
|
|
+ ['Format', 'Font', 'FontSize'],
|
|
|
+ ['Bold', 'Italic', 'Underline'],
|
|
|
+ [
|
|
|
+ 'JustifyLeft',
|
|
|
+ 'JustifyCenter',
|
|
|
+ 'JustifyRight',
|
|
|
+ '-',
|
|
|
+ 'NumberedList',
|
|
|
+ 'BulletedList',
|
|
|
+ '-',
|
|
|
+ 'Outdent',
|
|
|
+ 'Indent',
|
|
|
+ '-',
|
|
|
+ 'TextColor',
|
|
|
+ 'BGColor'
|
|
|
+ ],
|
|
|
+ ['ShowBlocks']
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get the toolbar configuration when CKEditor is minimized
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ protected function getMinimizedToolbar()
|
|
|
+ {
|
|
|
+ return [
|
|
|
+ ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
|
|
|
+ ['Undo', 'Redo'],
|
|
|
+ ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
|
|
|
+ ['BulletedList', 'NumberedList', 'HorizontalRule'],
|
|
|
+ ['JustifyLeft', 'JustifyCenter'],
|
|
|
+ ['Format', 'Font', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
|
|
|
+ ['Toolbarswitch']
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+}
|