Skip to content
Code-Schnipsel Gruppen Projekte
Commit 84b92ebc erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch '2.0.0-dev' into dev

Übergeordnete c4063d6a 950d01cc
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"codesnippet", "codesnippet",
"codesnippetgeshi", "codesnippetgeshi",
"codeTag", "codeTag",
"code",
"colorbutton", "colorbutton",
"colordialog", "colordialog",
"crossreference", "crossreference",
...@@ -51,6 +52,7 @@ ...@@ -51,6 +52,7 @@
"pre", "pre",
"preview", "preview",
"print", "print",
"qui-font-awesome",
"save", "save",
"scayt", "scayt",
"selectall", "selectall",
...@@ -75,5 +77,6 @@ ...@@ -75,5 +77,6 @@
"wordcount", "wordcount",
"xml", "xml",
"youtube", "youtube",
"forms",
"zoom" "zoom"
] ]
\ No newline at end of file
Code tag in CKEditor
==============
![](http://imgur.com/LN0MAEZ.png)
Install by placing in ckeditor/plugins/ and add the following to ckeditor/config.js
config.extraPlugins = 'codeTag';
\ No newline at end of file
plugins/ckeditor4/code/icons/code.png

557 B

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
(function () { (function () {
"use strict"; "use strict";
console.log(CKEDITOR);
CKEDITOR.plugins.add('qui-font-awesome', { CKEDITOR.plugins.add('qui-font-awesome', {
icons: "icon", icons: "icon",
lang : ['en', 'de'], lang : ['en', 'de'],
init : function (editor) { init : function (editor) {
console.log("Init");
this.$Editor = editor; this.$Editor = editor;
var self = this; var self = this;
...@@ -27,11 +25,9 @@ ...@@ -27,11 +25,9 @@
var window = new FontAwesomeDialog({}); var window = new FontAwesomeDialog({});
window.addEvent("submit", function (dialog, selected) { window.addEvent("submit", function (dialog, selected) {
console.log("Submit");
if (selected.length === 0) { if (selected.length === 0) {
return; return;
} }
console.log("Insert");
self.insertIcon(selected[0]); self.insertIcon(selected[0]);
}); });
......
...@@ -89,10 +89,15 @@ class Manager ...@@ -89,10 +89,15 @@ class Manager
continue; 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 # Check if/where the plugin is installed
$targetDir = $this->installedPluginDir . "/" . $entry; $targetDir = $this->installedPluginDir . "/" . $pluginName;
if (is_dir($this->activePluginDir . "/" . $entry)) { if (is_dir($this->activePluginDir . "/" . $pluginName)) {
$targetDir = $this->activePluginDir . "/" . $entry; $targetDir = $this->activePluginDir . "/" . $pluginName;
} }
if (is_dir($targetDir)) { if (is_dir($targetDir)) {
...@@ -135,24 +140,31 @@ class Manager ...@@ -135,24 +140,31 @@ class Manager
} }
foreach (scandir($srcDir) as $entry) { 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; $targetDir = $this->installedPluginDir;
if (in_array($entry, $activePlugins)) { if (in_array($entry, $activePlugins)) {
$targetDir = $this->activePluginDir; $targetDir = $this->activePluginDir;
} }
if ($entry == "." || $entry == "..") {
continue;
}
if (!is_dir($srcDir . "/" . $entry)) { if (!is_dir($srcDir . "/" . $entry)) {
continue; continue;
} }
if (is_dir($this->installedPluginDir . "/" . $entry)) { if (is_dir($this->installedPluginDir . "/" . $pluginName)) {
continue; continue;
} }
if (is_dir($this->activePluginDir . "/" . $entry)) { if (is_dir($this->activePluginDir . "/" . $pluginName)) {
continue; continue;
} }
...@@ -160,9 +172,10 @@ class Manager ...@@ -160,9 +172,10 @@ class Manager
continue; continue;
} }
$this->copyDir( $this->copyDir(
$srcDir . "/" . $entry, $srcDir . "/" . $entry,
$targetDir . "/" . $entry $targetDir . "/" . $pluginName
); );
} }
} }
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren