diff options
Diffstat (limited to 'sources/plugins/brclear/plugin.js')
-rw-r--r-- | sources/plugins/brclear/plugin.js | 26 |
1 files changed, 26 insertions, 0 deletions
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 @@ | |||
1 | /** | ||
2 | * BrClear CKEditor plugin | ||
3 | * @author Jacques Malgrange <contacter@boiteasite.fr> - 2015 - MIT License | ||
4 | */ | ||
5 | (function(){ | ||
6 | var brclearCmd={ | ||
7 | canUndo:true, | ||
8 | exec:function(editor){ | ||
9 | var brcl=editor.document.createElement('br',{attributes:{style:'clear:both;'}}); | ||
10 | editor.insertElement(brcl); | ||
11 | }, | ||
12 | html:'<br style="clear:both;" />' | ||
13 | }; | ||
14 | CKEDITOR.plugins.add('brclear',{ | ||
15 | lang:'en,es,fr', | ||
16 | init:function(editor){ | ||
17 | editor.addCommand('brclear',brclearCmd); | ||
18 | editor.ui.addButton('brclear',{ | ||
19 | icon:this.path+'brclear.png', | ||
20 | command:'brclear', | ||
21 | toolbar:'cleanup', | ||
22 | title:editor.lang.brclear.title | ||
23 | }); | ||
24 | } | ||
25 | }); | ||
26 | })(); | ||