2 Copyright (c) 2003-2010, 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 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 //Register map group;
\r
19 editor.addMenuGroup("list", 108);
\r
20 // If the "menu" plugin is loaded, register the menu items.
\r
21 if ( editor.addMenuItems )
\r
23 editor.addMenuItems(
\r
27 label : editor.lang.list.numberedTitle,
\r
29 command: 'numberedListStyle'
\r
33 label : editor.lang.list.bulletedTitle,
\r
35 command: 'bulletedListStyle'
\r
40 // If the "contextmenu" plugin is loaded, register the listeners.
\r
41 if ( editor.contextMenu )
\r
43 editor.contextMenu.addListener( function( element, selection )
\r
48 if ( element.getAscendant( 'ol') )
\r
49 return { numberedlist: CKEDITOR.TRISTATE_OFF };
\r
51 if ( element.getAscendant( 'ul' ) )
\r
52 return { bulletedlist: CKEDITOR.TRISTATE_OFF };
\r
58 CKEDITOR.plugins.add( 'liststyle', CKEDITOR.plugins.liststyle );
\r