]> git.immae.eu Git - perso/Immae/Projets/packagist/ludivine-ckeditor-component.git/blame - sources/plugins/horizontalrule/plugin.js
Update to 4.7.3
[perso/Immae/Projets/packagist/ludivine-ckeditor-component.git] / sources / plugins / horizontalrule / plugin.js
CommitLineData
c63493c8
IB
1/**\r
2 * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\r
3 * For licensing, see LICENSE.md or http://ckeditor.com/license\r
4 */\r
5\r
6/**\r
7 * @fileOverview Horizontal Rule plugin.\r
8 */\r
9\r
10( function() {\r
11 var horizontalruleCmd = {\r
12 canUndo: false, // The undo snapshot will be handled by 'insertElement'.\r
13 exec: function( editor ) {\r
14 var hr = editor.document.createElement( 'hr' );\r
15 editor.insertElement( hr );\r
16 },\r
17\r
18 allowedContent: 'hr',\r
19 requiredContent: 'hr'\r
20 };\r
21\r
22 var pluginName = 'horizontalrule';\r
23\r
24 // Register a plugin named "horizontalrule".\r
25 CKEDITOR.plugins.add( pluginName, {\r
26 // jscs:disable maximumLineLength\r
1794320d 27 lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%\r
c63493c8
IB
28 // jscs:enable maximumLineLength\r
29 icons: 'horizontalrule', // %REMOVE_LINE_CORE%\r
30 hidpi: true, // %REMOVE_LINE_CORE%\r
31 init: function( editor ) {\r
32 if ( editor.blockless )\r
33 return;\r
34\r
35 editor.addCommand( pluginName, horizontalruleCmd );\r
36 editor.ui.addButton && editor.ui.addButton( 'HorizontalRule', {\r
37 label: editor.lang.horizontalrule.toolbar,\r
38 command: pluginName,\r
39 toolbar: 'insert,40'\r
40 } );\r
41 }\r
42 } );\r
43} )();\r