[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/libraries/ckeditor/_source/plugins/horizontalrule/ -> plugin.js (source)

   1  /*

   2  Copyright (c) 2003-2010, 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          canUndo : false,    // The undo snapshot will be handled by 'insertElement'.
  15          exec : function( editor )
  16          {
  17              editor.insertElement( editor.document.createElement( 'hr' ) );
  18          }
  19      };
  20  
  21      var pluginName = 'horizontalrule';
  22  
  23      // Register a plugin named "horizontalrule".

  24      CKEDITOR.plugins.add( pluginName,
  25      {
  26          init : function( editor )
  27          {
  28              editor.addCommand( pluginName, horizontalruleCmd );
  29              editor.ui.addButton( 'HorizontalRule',
  30                  {
  31                      label : editor.lang.horizontalrule,
  32                      command : pluginName
  33                  });
  34          }
  35      });
  36  })();


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7