diff --git a/plugins/activePlugins.json b/plugins/activePlugins.json index de1f3b76761717e6274708d07b8c0dfac5f4641e..ff810ece67f558a81c28aacc16c6403b35487969 100644 --- a/plugins/activePlugins.json +++ b/plugins/activePlugins.json @@ -11,6 +11,7 @@ "codesnippet", "codesnippetgeshi", "codeTag", + "code", "colorbutton", "colordialog", "crossreference", @@ -51,6 +52,7 @@ "pre", "preview", "print", + "qui-font-awesome", "save", "scayt", "selectall", @@ -75,5 +77,6 @@ "wordcount", "xml", "youtube", + "forms", "zoom" ] \ No newline at end of file diff --git a/plugins/ckeditor4/code/README.md b/plugins/ckeditor4/code/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7e1ad8840fd01701261a62717ff905aaa65593cb --- /dev/null +++ b/plugins/ckeditor4/code/README.md @@ -0,0 +1,8 @@ +Code tag in CKEditor +============== + + + +Install by placing in ckeditor/plugins/ and add the following to ckeditor/config.js + + config.extraPlugins = 'codeTag'; \ No newline at end of file diff --git a/plugins/ckeditor4/code/icons/code.png b/plugins/ckeditor4/code/icons/code.png new file mode 100644 index 0000000000000000000000000000000000000000..f7f8c39b07286c8c26393f86f6cfd886eb9ebdc9 Binary files /dev/null and b/plugins/ckeditor4/code/icons/code.png differ diff --git a/plugins/ckeditor4/code/plugin.js b/plugins/ckeditor4/code/plugin.js new file mode 100644 index 0000000000000000000000000000000000000000..802f7680d19000babc44255efa456f608742424b --- /dev/null +++ b/plugins/ckeditor4/code/plugin.js @@ -0,0 +1,15 @@ +CKEDITOR.plugins.add( 'codeTag', { + icons: 'code', + init: function( editor ) { + editor.addCommand( 'wrapCode', { + exec: function( editor ) { + editor.insertHtml( '<code>' + editor.getSelection().getSelectedText() + '</code>' ); + } + }); + editor.ui.addButton( 'Code', { + label: 'Wrap code', + command: 'wrapCode', + toolbar: 'insert' + }); + } +}); \ No newline at end of file diff --git a/plugins/quiqqer/qui-font-awesome/plugin.js b/plugins/quiqqer/qui-font-awesome/plugin.js index 0e3dd54d0a56eadef8e5056719fad9fc03269858..30b9cf0c7d1a3b2e54de0143832f944a27bfe20f 100644 --- a/plugins/quiqqer/qui-font-awesome/plugin.js +++ b/plugins/quiqqer/qui-font-awesome/plugin.js @@ -1,14 +1,12 @@ (function () { "use strict"; - console.log(CKEDITOR); + CKEDITOR.plugins.add('qui-font-awesome', { icons: "icon", lang : ['en', 'de'], init : function (editor) { - console.log("Init"); - this.$Editor = editor; var self = this; @@ -27,11 +25,9 @@ var window = new FontAwesomeDialog({}); window.addEvent("submit", function (dialog, selected) { - console.log("Submit"); if (selected.length === 0) { return; } - console.log("Insert"); self.insertIcon(selected[0]); }); diff --git a/src/QUI/Ckeditor/Plugins/Manager.php b/src/QUI/Ckeditor/Plugins/Manager.php index 55f64f56a21c7dcde89c3e6ce1bb465ad6a875eb..416bc9704945075e0d0352e4c10d15080f1a335f 100644 --- a/src/QUI/Ckeditor/Plugins/Manager.php +++ b/src/QUI/Ckeditor/Plugins/Manager.php @@ -89,10 +89,15 @@ class Manager continue; } + $pluginName = $entry; + // Special case, because gitlab gets confused with the dirctory named "codeTag" + if ($entry == "code") { + $pluginName= "codeTag"; + } # Check if/where the plugin is installed - $targetDir = $this->installedPluginDir . "/" . $entry; - if (is_dir($this->activePluginDir . "/" . $entry)) { - $targetDir = $this->activePluginDir . "/" . $entry; + $targetDir = $this->installedPluginDir . "/" . $pluginName; + if (is_dir($this->activePluginDir . "/" . $pluginName)) { + $targetDir = $this->activePluginDir . "/" . $pluginName; } if (is_dir($targetDir)) { @@ -135,24 +140,31 @@ class Manager } foreach (scandir($srcDir) as $entry) { + if ($entry == "." || $entry == "..") { + continue; + } + + $pluginName = $entry; + // Special case, because gitlab gets confused with the dirctory named "codeTag" + if ($entry == "code") { + $pluginName= "codeTag"; + } + $targetDir = $this->installedPluginDir; if (in_array($entry, $activePlugins)) { $targetDir = $this->activePluginDir; } - if ($entry == "." || $entry == "..") { - continue; - } if (!is_dir($srcDir . "/" . $entry)) { continue; } - if (is_dir($this->installedPluginDir . "/" . $entry)) { + if (is_dir($this->installedPluginDir . "/" . $pluginName)) { continue; } - if (is_dir($this->activePluginDir . "/" . $entry)) { + if (is_dir($this->activePluginDir . "/" . $pluginName)) { continue; } @@ -160,9 +172,10 @@ class Manager continue; } + $this->copyDir( $srcDir . "/" . $entry, - $targetDir . "/" . $entry + $targetDir . "/" . $pluginName ); } }