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
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -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
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 () {
"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]);
});
......
......@@ -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
);
}
}
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren