X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=sources%2Fplugins%2Fbrclear%2Fplugin.js;fp=sources%2Fplugins%2Fbrclear%2Fplugin.js;h=a11ac324c11672b79810f5c114eac9aed1b6eeda;hb=cd64262b335d84c1dc18cd1b986712cf7befdefb;hp=0000000000000000000000000000000000000000;hpb=c63493c899de714b05b0521bb38aab60d19030ef;p=perso%2FImmae%2FProjets%2Fpackagist%2Fludivine-ckeditor-component.git diff --git a/sources/plugins/brclear/plugin.js b/sources/plugins/brclear/plugin.js new file mode 100644 index 0000000..a11ac32 --- /dev/null +++ b/sources/plugins/brclear/plugin.js @@ -0,0 +1,26 @@ +/** +* BrClear CKEditor plugin +* @author Jacques Malgrange - 2015 - MIT License +*/ +(function(){ + var brclearCmd={ + canUndo:true, + exec:function(editor){ + var brcl=editor.document.createElement('br',{attributes:{style:'clear:both;'}}); + editor.insertElement(brcl); + }, + html:'
' + }; + CKEDITOR.plugins.add('brclear',{ + lang:'en,es,fr', + init:function(editor){ + editor.addCommand('brclear',brclearCmd); + editor.ui.addButton('brclear',{ + icon:this.path+'brclear.png', + command:'brclear', + toolbar:'cleanup', + title:editor.lang.brclear.title + }); + } + }); +})();