Arek Wtykło

arteCode dla CKEditora

... ... @@ -15,10 +15,10 @@ CKEDITOR.plugins.add('artecode', {
command: 'insertJS',
icon: this.path + 'js.png'
});
editor.addCommand('insertHTML', {
exec: function (editor) {
editor.insertHtml('<p><br/></p><pre><code class="line-numbers language-html">Amazing HTML5 code</code></pre>');
editor.insertHtml('<p><br/></p><pre><code class="line-numbers language-twig">Amazing HTML5/TWIG code</code></pre>');
}
});
editor.ui.addButton('insertHTML', {
... ... @@ -26,10 +26,10 @@ CKEDITOR.plugins.add('artecode', {
command: 'insertHTML',
icon: this.path + 'html5.png'
});
editor.addCommand('insertCSS', {
exec: function (editor) {
editor.insertHtml('<p><br/></p><pre><code class="line-numbers language-css">Amazing CSS3 code</code></pre>');
editor.insertHtml('<p><br/></p><pre><code class="line-numbers language-less">Amazing CSS3/LESS code</code></pre>');
}
});
editor.ui.addButton('insertCSS', {
... ... @@ -37,7 +37,7 @@ CKEDITOR.plugins.add('artecode', {
command: 'insertCSS',
icon: this.path + 'css3.png'
});
editor.addCommand('insertBash', {
exec: function (editor) {
editor.insertHtml('<p><br/></p><pre><code class="line-numbers language-bash">Amazing Bash code</code></pre>');
... ... @@ -48,7 +48,7 @@ CKEDITOR.plugins.add('artecode', {
command: 'insertBash',
icon: this.path + 'bash.png'
});
editor.addCommand('insertPhp', {
exec: function (editor) {
editor.insertHtml('<p><br/></p><pre><code class="line-numbers language-php">Amazing PHP7 code</code></pre>');
... ... @@ -64,6 +64,8 @@ CKEDITOR.plugins.add('artecode', {
CKEDITOR.editorConfig = function (config) {
config.extraPlugins = 'artecode';
config.toolbar = [
{name: 'document', groups: ['mode', 'document', 'doctools', 'clipboard', 'undo'], items: ['Source', '-', 'Save', '-', 'Templates', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo']},
{name: 'basicstyles', groups: ['basicstyles', 'cleanup'], items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat']},
... ...