Sha256: 78f896366810f6d9337e55934878bd480bbc1f739f35b3e816768e8f9fa3ca54

Contents?: true

Size: 1.76 KB

Versions: 88

Compression:

Stored size: 1.76 KB

Contents

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

88 entries across 85 versions & 9 rubygems

Version Path
rich-0.0.8 vendor/assets/ckeditor/ckeditor/_source/plugins/table/plugin.js
rich-0.0.7 test/dummy/public/assets/ckeditor/_source/plugins/table/plugin.js
rich-0.0.7 vendor/assets/ckeditor/ckeditor/_source/plugins/table/plugin.js
rich-0.0.6 vendor/assets/ckeditor/ckeditor/_source/plugins/table/plugin.js
quic_cms-0.1.3 app/assets/javascripts/quic_cms/ckeditor/_source/plugins/table/plugin.js
quic_cms-0.1.2 app/assets/javascripts/quic_cms/ckeditor/_source/plugins/table/plugin.js
quic_cms-0.1.1 app/assets/javascripts/quic_cms/ckeditor/_source/plugins/table/plugin.js
quic_cms-0.1.0 app/assets/javascripts/quic_cms/ckeditor/_source/plugins/table/plugin.js
quic_cms-0.0.9 app/assets/javascripts/quic_cms/ckeditor/_source/plugins/table/plugin.js
rich-0.0.4 test/dummy/public/assets/ckeditor/_source/plugins/table/plugin.js
rich-0.0.4 vendor/assets/ckeditor/ckeditor/_source/plugins/table/plugin.js
rich-0.0.3 vendor/assets/ckeditor/ckeditor/_source/plugins/table/plugin.js
radiant-ck_editor_filter-extension-0.2.5 public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/plugin.js
inline_forms-0.9.25 public/javascripts/ckeditor/_source/plugins/table/plugin.js
inline_forms-0.9.24 public/javascripts/ckeditor/_source/plugins/table/plugin.js
ckeditor-3.6.2 test/tmp/public/javascripts/ckeditor/_source/plugins/table/plugin.js
inline_forms-0.9.23 public/javascripts/ckeditor/_source/plugins/table/plugin.js
inline_forms-0.9.22 public/javascripts/ckeditor/_source/plugins/table/plugin.js
inline_forms-0.9.21 public/javascripts/ckeditor/_source/plugins/table/plugin.js
inline_forms-0.9.20 public/javascripts/ckeditor/_source/plugins/table/plugin.js