瀏覽代碼

Added Wiris Editor for CKEditor - Refs #7961

José Loguercio 9 年之前
父節點
當前提交
beb11dc94c

+ 5 - 0
main/inc/lib/javascript/ckeditor/plugins/ckeditor_wiris/Readme.txt

@@ -0,0 +1,5 @@
+For activate Wiris Editor for CkEditor you need to 
+Download the Plugin and copy the files inside this folder :
+
+http://www.wiris.com/es/plugins3/ckeditor/download
+

+ 1 - 1
main/template/default/layout/header.js.tpl

@@ -4,7 +4,7 @@ var plugins = [
     'asciimath',
     'asciisvg',
     'audio',
-    //'ckeditor_wiris',
+    'ckeditor_wiris',
     'dialogui',
     'glossary',
     'leaflet',

+ 3 - 1
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php

@@ -108,7 +108,7 @@ class Basic extends Toolbar
 
         if (api_get_setting('enabled_wiris') == 'true') {
             // Commercial plugin
-            //$plugins[] = 'ckeditor_wiris';
+            $plugins[] = 'ckeditor_wiris';
         }
 
         if (api_get_setting('enabled_imgmap') == 'true') {
@@ -204,6 +204,7 @@ class Basic extends Toolbar
             ['BulletedList', 'NumberedList', 'HorizontalRule'],
             ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
             ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Toolbarswitch']
         ];
     }
@@ -241,6 +242,7 @@ class Basic extends Toolbar
             [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
             ['Styles', 'Format', 'Font', 'FontSize'],
             ['PageBreak', 'ShowBlocks', 'Source'],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Toolbarswitch'],
         ];
     }

+ 3 - 1
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php

@@ -81,7 +81,8 @@ class Documents extends Basic
             '/',
             ['Styles', 'Format', 'Font', 'FontSize'],
             ['Bold', 'Italic', 'Underline'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight']
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : ['']
         ];
     }
 
@@ -118,6 +119,7 @@ class Documents extends Basic
                 'BGColor',
                 'Source',
             ],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Toolbarswitch']
         ];
     }

+ 3 - 0
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/DocumentsStudent.php

@@ -82,6 +82,7 @@ class DocumentsStudent extends Basic
             [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']
         ];
     }
@@ -119,6 +120,7 @@ class DocumentsStudent extends Basic
             ['Styles', 'Format', 'Font', 'FontSize'],
             ['Bold', 'Italic', 'Underline'],
             ['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['ShowBlocks']
         ];
     }
@@ -154,6 +156,7 @@ class DocumentsStudent extends Basic
                 'TextColor',
                 'BGColor',
             ],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Toolbarswitch']
         ];
     }

+ 2 - 0
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Wiki.php

@@ -80,6 +80,7 @@ class Wiki extends Basic
                 'BGColor',
                 api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : '',
             ],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Source']
         ];
     }
@@ -97,6 +98,7 @@ class Wiki extends Basic
             ['BulletedList', 'NumberedList', 'HorizontalRule'],
             ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
             ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Toolbarswitch']
         ];
     }

+ 3 - 0
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/WikiStudent.php

@@ -66,6 +66,7 @@ class WikiStudent extends Basic
             [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']
         ];
     }
@@ -115,6 +116,7 @@ class WikiStudent extends Basic
                 'TextColor',
                 'BGColor'
             ],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['ShowBlocks']
         ];
     }
@@ -132,6 +134,7 @@ class WikiStudent extends Basic
             ['BulletedList', 'NumberedList', 'HorizontalRule'],
             ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
             ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Toolbarswitch']
         ];
     }

+ 3 - 0
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/WikiTask.php

@@ -58,6 +58,7 @@ class WikiTask extends Basic
             [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
             ['Styles', 'Format', 'Font', 'FontSize'],
             ['PageBreak', 'ShowBlocks', 'Source'],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Toolbarswitch']
         ];
     }
@@ -75,6 +76,7 @@ class WikiTask extends Basic
             ['Table'],
             ['Bold', 'Italic', 'Underline'],
             ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor'],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Source']
         ];
     }
@@ -92,6 +94,7 @@ class WikiTask extends Basic
             ['BulletedList', 'NumberedList', 'HorizontalRule'],
             ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
             ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Toolbarswitch']
         ];
     }