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