JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0
[ckeditor.git] / _source / plugins / horizontalrule / plugin.js
1 /*\r
2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license\r
4 */\r
5 \r
6 /**\r
7  * @file Horizontal Rule plugin.\r
8  */\r
9 \r
10 (function()\r
11 {\r
12         var horizontalruleCmd =\r
13         {\r
14                 exec : function( editor )\r
15                 {\r
16                         editor.insertElement( editor.document.createElement( 'hr' ) );\r
17                 }\r
18         };\r
19 \r
20         var pluginName = 'horizontalrule';\r
21 \r
22         // Register a plugin named "horizontalrule".\r
23         CKEDITOR.plugins.add( pluginName,\r
24         {\r
25                 init : function( editor )\r
26                 {\r
27                         editor.addCommand( pluginName, horizontalruleCmd );\r
28                         editor.ui.addButton( 'HorizontalRule',\r
29                                 {\r
30                                         label : editor.lang.horizontalrule,\r
31                                         command : pluginName\r
32                                 });\r
33                 }\r
34         });\r
35 })();\r