]> git.immae.eu Git - perso/Immae/Projets/packagist/ludivine-ckeditor-component.git/blame - sources/plugins/brclear/plugin.js
Add brclear
[perso/Immae/Projets/packagist/ludivine-ckeditor-component.git] / sources / plugins / brclear / plugin.js
CommitLineData
cd64262b
IB
1/**\r
2* BrClear CKEditor plugin\r
3* @author Jacques Malgrange <contacter@boiteasite.fr> - 2015 - MIT License\r
4*/\r
5(function(){\r
6 var brclearCmd={\r
7 canUndo:true,\r
8 exec:function(editor){\r
9 var brcl=editor.document.createElement('br',{attributes:{style:'clear:both;'}});\r
10 editor.insertElement(brcl);\r
11 },\r
12 html:'<br style="clear:both;" />'\r
13 };\r
14 CKEDITOR.plugins.add('brclear',{\r
15 lang:'en,es,fr',\r
16 init:function(editor){\r
17 editor.addCommand('brclear',brclearCmd);\r
18 editor.ui.addButton('brclear',{\r
19 icon:this.path+'brclear.png',\r
20 command:'brclear',\r
21 toolbar:'cleanup',\r
22 title:editor.lang.brclear.title\r
23 });\r
24 }\r
25 });\r
26})();\r