Sha256: 52f34727a76e7118ea1a9b8f25080b65e37b3a8b666f5fe7e427fd54cb486b5d

Contents?: true

Size: 1.95 KB

Versions: 7

Compression:

Stored size: 1.95 KB

Contents

/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

(function()
{
  CKEDITOR.plugins.liststyle =
  {
    requires : [ 'dialog' ],
    init : function( editor )
    {
      editor.addCommand( 'numberedListStyle', new CKEDITOR.dialogCommand( 'numberedListStyle' ) );
      CKEDITOR.dialog.add( 'numberedListStyle', this.path + 'dialogs/liststyle.js' );
      editor.addCommand( 'bulletedListStyle', new CKEDITOR.dialogCommand( 'bulletedListStyle' ) );
      CKEDITOR.dialog.add( 'bulletedListStyle', this.path + 'dialogs/liststyle.js' );

      // If the "menu" plugin is loaded, register the menu items.
      if ( editor.addMenuItems )
      {
        //Register map group;
        editor.addMenuGroup("list", 108);

        editor.addMenuItems(
          {
            numberedlist :
            {
              label : editor.lang.list.numberedTitle,
              group : 'list',
              command: 'numberedListStyle'
            },
            bulletedlist :
            {
              label : editor.lang.list.bulletedTitle,
              group : 'list',
              command: 'bulletedListStyle'
            }
          });
      }

      // If the "contextmenu" plugin is loaded, register the listeners.
      if ( editor.contextMenu )
      {
        editor.contextMenu.addListener( function( element, selection )
          {
            if ( !element || element.isReadOnly() )
              return null;

            while ( element )
            {
              var name = element.getName();
              if ( name == 'ol' )
                return { numberedlist: CKEDITOR.TRISTATE_OFF };
              else if ( name == 'ul' )
                return { bulletedlist: CKEDITOR.TRISTATE_OFF };

              element = element.getParent();
            }
            return null;
          });
      }
    }
  };

  CKEDITOR.plugins.add( 'liststyle', CKEDITOR.plugins.liststyle );
})();

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
esp-ckeditor-0.1.7 vendor/assets/javascripts/_source/plugins/liststyle/plugin.js
esp-ckeditor-0.1.6 vendor/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js
esp-ckeditor-0.1.4 vendor/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js
esp-ckeditor-0.1.3 app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js
esp-ckeditor-0.1.2 app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js
esp-ckeditor-0.1.1 app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js
esp-ckeditor-0.1.0 app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js