Sha256: ca430d4d394032f6c2af880bae4529ba7298470a3ffa764d6c2a826b72456f80

Contents?: true

Size: 1.78 KB

Versions: 88

Compression:

Stored size: 1.78 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

88 entries across 85 versions & 9 rubygems

Version Path
ckeditor-rails-0.0.2 vendor/assets/ckeditor/ckeditor/_source/plugins/liststyle/plugin.js
ckeditor-rails-0.0.1 vendor/assets/ckeditor/_source/plugins/liststyle/plugin.js
radiant-ck_editor_filter-extension-0.2.4 public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/liststyle/plugin.js
inline_forms-0.9.19 public/javascripts/ckeditor/_source/plugins/liststyle/plugin.js
radiant-ck_editor_filter-extension-0.2.3 public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/liststyle/plugin.js
radiant-ck_editor_filter-extension-0.2.2 public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/liststyle/plugin.js
inline_forms-0.9.18 public/javascripts/ckeditor/_source/plugins/liststyle/plugin.js
radiant-ck_editor_filter-extension-0.2.1 public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/liststyle/plugin.js