Sha256: dd418d2eb1c293ed93c382691647003002e6e581f9dea73bfe54a051ba5cca59

Contents?: true

Size: 1.76 KB

Versions: 7

Compression:

Stored size: 1.76 KB

Contents

/*
Copyright (c) 2003-2012, 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

7 entries across 7 versions & 4 rubygems

Version Path
rich-1.3.1 vendor/assets/ckeditor/ckeditor/_source/plugins/table/plugin.js
rich-1.3.0 vendor/assets/ckeditor/ckeditor/_source/plugins/table/plugin.js
rich-1.2.0 vendor/assets/ckeditor/ckeditor/_source/plugins/table/plugin.js
ckeditor-rails-0.0.5 vendor/assets/ckeditor/ckeditor/_source/plugins/table/plugin.js
refinerycms-ckeditor-0.2.0 app/assets/javascripts/ckeditor/_source/plugins/table/plugin.js
rich-1.1.0 vendor/assets/ckeditor/ckeditor/_source/plugins/table/plugin.js
radiant-ck_editor_filter-extension-0.2.6 public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/plugin.js