JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0
[ckeditor.git] / _source / plugins / horizontalrule / plugin.js
diff --git a/_source/plugins/horizontalrule/plugin.js b/_source/plugins/horizontalrule/plugin.js
new file mode 100644 (file)
index 0000000..80ae0dc
--- /dev/null
@@ -0,0 +1,35 @@
+/*\r
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+/**\r
+ * @file Horizontal Rule plugin.\r
+ */\r
+\r
+(function()\r
+{\r
+       var horizontalruleCmd =\r
+       {\r
+               exec : function( editor )\r
+               {\r
+                       editor.insertElement( editor.document.createElement( 'hr' ) );\r
+               }\r
+       };\r
+\r
+       var pluginName = 'horizontalrule';\r
+\r
+       // Register a plugin named "horizontalrule".\r
+       CKEDITOR.plugins.add( pluginName,\r
+       {\r
+               init : function( editor )\r
+               {\r
+                       editor.addCommand( pluginName, horizontalruleCmd );\r
+                       editor.ui.addButton( 'HorizontalRule',\r
+                               {\r
+                                       label : editor.lang.horizontalrule,\r
+                                       command : pluginName\r
+                               });\r
+               }\r
+       });\r
+})();\r