From 08edc75a3a465a3d299abfc06e0d22770efa1708 Mon Sep 17 00:00:00 2001 From: Florian Bogner <f.bogner@pcsg.de> Date: Mon, 7 Aug 2017 13:25:11 +0200 Subject: [PATCH] feat: renamed coetag to code, to avoid confusing gitlab --- plugins/ckeditor4/code/README.md | 8 ++++++++ plugins/ckeditor4/code/icons/code.png | Bin 0 -> 557 bytes plugins/ckeditor4/code/plugin.js | 15 +++++++++++++++ plugins/ckeditor4/codeTag | 1 - 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 plugins/ckeditor4/code/README.md create mode 100644 plugins/ckeditor4/code/icons/code.png create mode 100644 plugins/ckeditor4/code/plugin.js delete mode 160000 plugins/ckeditor4/codeTag diff --git a/plugins/ckeditor4/code/README.md b/plugins/ckeditor4/code/README.md new file mode 100644 index 0000000..7e1ad88 --- /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 GIT binary patch literal 557 zcmV+|0@D47P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000XU z000XU0RWnu7ytkOAY({UO#lFTB>(_`g8%^e{{R4h=l}px2mk>USO5SzmjD14Z`WEM zkN^Myvq?ljRCwCNlQC=CKorN{8Oc<7dO})ExJ?>7X_Afz3ff$w@6fq6nmiZ+Ii%4; zhR#NxpdTRFqB-CWSp^!ri0A{D8hbEYmk1Ik?UF*@_`m!8?%q9)DW%{eHGqFzVHnPY z5GoAA+268vZxBV%jEG9tbpa8}K1amTbzLB$GK!+vy8<D^6%m!TZ37~Ll(Om9q?8RJ zf^FMxB!eEdEbE4dK-YE1vaCtdblGo8({!0-S)=PZ5D^ejDTKHJ0MO3i`F!3?r_&{4 z?5-Cu#_pb{^}Q_1F%ba(+z25+^L;-%91buX4#D^RU+3_-q^hbP+wImOA{dQE*`O$j zN5^qaj4`O|+DejS@uvwTNwTQx+G31><2a|HC>{qv5M1YZ{(y)lP1C?Ij7c2F_vdgN z$M=R|Of*dcL_Fnr{tyJgH3I-pN{zd&Td!8D&t2Dj+VA(U+wH2&X7i<oZQGt8B5=-+ zi^byScs%~b7;6U4{WYBPuTsj2bAB{U6Fkqm>`(VR@6t3);G7?&lvNME=}{?l(YEdF vdcA&X+xE84UuH_Fi&u~P-#^ob1-}OXmAam_5Qlu?00000NkvXXu0mjfkUR5G literal 0 HcmV?d00001 diff --git a/plugins/ckeditor4/code/plugin.js b/plugins/ckeditor4/code/plugin.js new file mode 100644 index 0000000..802f768 --- /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/ckeditor4/codeTag b/plugins/ckeditor4/codeTag deleted file mode 160000 index 8908650..0000000 --- a/plugins/ckeditor4/codeTag +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8908650a6bdf9bd084822d86e320f530364d0b4b -- GitLab