2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
8 CKEDITOR.plugins.liststyle =
\r
10 requires : [ 'dialog' ],
\r
11 init : function( editor )
\r
13 editor.addCommand( 'numberedListStyle', new CKEDITOR.dialogCommand( 'numberedListStyle' ) );
\r
14 CKEDITOR.dialog.add( 'numberedListStyle', this.path + 'dialogs/liststyle.js' );
\r
15 editor.addCommand( 'bulletedListStyle', new CKEDITOR.dialogCommand( 'bulletedListStyle' ) );
\r
16 CKEDITOR.dialog.add( 'bulletedListStyle', this.path + 'dialogs/liststyle.js' );
\r
18 // If the "menu" plugin is loaded, register the menu items.
\r
19 if ( editor.addMenuItems )
\r
21 //Register map group;
\r
22 editor.addMenuGroup("list", 108);
\r
24 editor.addMenuItems(
\r
28 label : editor.lang.list.numberedTitle,
\r
30 command: 'numberedListStyle'
\r
34 label : editor.lang.list.bulletedTitle,
\r
36 command: 'bulletedListStyle'
\r
41 // If the "contextmenu" plugin is loaded, register the listeners.
\r
42 if ( editor.contextMenu )
\r
44 editor.contextMenu.addListener( function( element, selection )
\r
46 if ( !element || element.isReadOnly() )
\r
51 var name = element.getName();
\r
53 return { numberedlist: CKEDITOR.TRISTATE_OFF };
\r
54 else if ( name == 'ul' )
\r
55 return { bulletedlist: CKEDITOR.TRISTATE_OFF };
\r
57 element = element.getParent();
\r
65 CKEDITOR.plugins.add( 'liststyle', CKEDITOR.plugins.liststyle );
\r