Sha256: 9b0127e10a7d0b3d2eea3b7725b7e4f2f417c622c64e7f5a028400e94895a0a5

Contents?: true

Size: 1.76 KB

Versions: 66

Compression:

Stored size: 1.76 KB

Contents

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

CKEDITOR.plugins.add( 'table',
{
	init : function( editor )
	{
		var table = CKEDITOR.plugins.table,
			lang = editor.lang.table;

		editor.addCommand( 'table', new CKEDITOR.dialogCommand( 'table' ) );
		editor.addCommand( 'tableProperties', new CKEDITOR.dialogCommand( 'tableProperties' ) );

		editor.ui.addButton( 'Table',
			{
				label : lang.toolbar,
				command : 'table'
			});

		CKEDITOR.dialog.add( 'table', this.path + 'dialogs/table.js' );
		CKEDITOR.dialog.add( 'tableProperties', this.path + 'dialogs/table.js' );

		// If the "menu" plugin is loaded, register the menu items.
		if ( editor.addMenuItems )
		{
			editor.addMenuItems(
				{
					table :
					{
						label : lang.menu,
						command : 'tableProperties',
						group : 'table',
						order : 5
					},

					tabledelete :
					{
						label : lang.deleteTable,
						command : 'tableDelete',
						group : 'table',
						order : 1
					}
				} );
		}

		editor.on( 'doubleclick', function( evt )
			{
				var element = evt.data.element;

				if ( element.is( 'table' ) )
					evt.data.dialog = 'tableProperties';
			});

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

					var isTable = element.hasAscendant( 'table', 1 );

					if ( isTable )
					{
						return {
							tabledelete : CKEDITOR.TRISTATE_OFF,
							table : CKEDITOR.TRISTATE_OFF
						};
					}

					return null;
				} );
		}
	}
} );

Version data entries

66 entries across 66 versions & 9 rubygems

Version Path
blog_logic-1.4.2 public/javascripts/ckeditor/_source/plugins/table/plugin.js
editorial_logic-1.4.2 public/javascripts/ckeditor/_source/plugins/table/plugin.js
site_logic-1.9.4 public/javascripts/ckeditor/_source/plugins/table/plugin.js
site_logic-1.9.3 public/javascripts/ckeditor/_source/plugins/table/plugin.js
blog_logic-1.4.1 public/javascripts/ckeditor/_source/plugins/table/plugin.js
ppc_logic-0.8.0 public/javascripts/ckeditor/_source/plugins/table/plugin.js
editorial_logic-1.4.1 public/javascripts/ckeditor/_source/plugins/table/plugin.js
blog_logic-1.4.0 public/javascripts/ckeditor/_source/plugins/table/plugin.js
editorial_logic-1.4.0 public/javascripts/ckeditor/_source/plugins/table/plugin.js
blog_logic-1.3.1 public/javascripts/ckeditor/_source/plugins/table/plugin.js
blog_logic-1.3.0 public/javascripts/ckeditor/_source/plugins/table/plugin.js
blog_logic-1.2.4 public/javascripts/ckeditor/_source/plugins/table/plugin.js
site_logic-1.9.2 public/javascripts/ckeditor/_source/plugins/table/plugin.js
blog_logic-1.2.3 public/javascripts/ckeditor/_source/plugins/table/plugin.js
blog_logic-1.2.2 public/javascripts/ckeditor/_source/plugins/table/plugin.js
blog_logic-1.2.1 public/javascripts/ckeditor/_source/plugins/table/plugin.js
editorial_logic-1.3.3 public/javascripts/ckeditor/_source/plugins/table/plugin.js
site_logic-1.9.1 public/javascripts/ckeditor/_source/plugins/table/plugin.js
blog_logic-1.2.0 public/javascripts/ckeditor/_source/plugins/table/plugin.js
blog_logic-1.1.9 public/javascripts/ckeditor/_source/plugins/table/plugin.js