[44] | 1 | /*
|
---|
| 2 | * FCKeditor - The text editor for internet
|
---|
| 3 | * Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
---|
| 4 | *
|
---|
| 5 | * Licensed under the terms of the GNU Lesser General Public License:
|
---|
| 6 | * http://www.opensource.org/licenses/lgpl-license.php
|
---|
| 7 | *
|
---|
| 8 | * For further information visit:
|
---|
| 9 | * http://www.fckeditor.net/
|
---|
| 10 | *
|
---|
| 11 | * "Support Open Source software. What about a donation today?"
|
---|
| 12 | *
|
---|
| 13 | * File Name: fcktablecommand.js
|
---|
| 14 | * FCKPastePlainTextCommand Class: represents the
|
---|
| 15 | * "Paste as Plain Text" command.
|
---|
| 16 | *
|
---|
| 17 | * File Authors:
|
---|
| 18 | * Frederico Caldeira Knabben (fredck@fckeditor.net)
|
---|
| 19 | */
|
---|
| 20 |
|
---|
| 21 | var FCKTableCommand = function( command )
|
---|
| 22 | {
|
---|
| 23 | this.Name = command ;
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | FCKTableCommand.prototype.Execute = function()
|
---|
| 27 | {
|
---|
| 28 | FCKUndo.SaveUndoStep() ;
|
---|
| 29 |
|
---|
| 30 | switch ( this.Name )
|
---|
| 31 | {
|
---|
| 32 | case 'TableInsertRow' :
|
---|
| 33 | FCKTableHandler.InsertRow() ;
|
---|
| 34 | break ;
|
---|
| 35 | case 'TableDeleteRows' :
|
---|
| 36 | FCKTableHandler.DeleteRows() ;
|
---|
| 37 | break ;
|
---|
| 38 | case 'TableInsertColumn' :
|
---|
| 39 | FCKTableHandler.InsertColumn() ;
|
---|
| 40 | break ;
|
---|
| 41 | case 'TableDeleteColumns' :
|
---|
| 42 | FCKTableHandler.DeleteColumns() ;
|
---|
| 43 | break ;
|
---|
| 44 | case 'TableInsertCell' :
|
---|
| 45 | FCKTableHandler.InsertCell() ;
|
---|
| 46 | break ;
|
---|
| 47 | case 'TableDeleteCells' :
|
---|
| 48 | FCKTableHandler.DeleteCells() ;
|
---|
| 49 | break ;
|
---|
| 50 | case 'TableMergeCells' :
|
---|
| 51 | FCKTableHandler.MergeCells() ;
|
---|
| 52 | break ;
|
---|
| 53 | case 'TableSplitCell' :
|
---|
| 54 | FCKTableHandler.SplitCell() ;
|
---|
| 55 | break ;
|
---|
| 56 | case 'TableDelete' :
|
---|
| 57 | FCKTableHandler.DeleteTable() ;
|
---|
| 58 | break ;
|
---|
| 59 | default :
|
---|
| 60 | alert( FCKLang.UnknownCommand.replace( /%1/g, this.Name ) ) ;
|
---|
| 61 | }
|
---|
| 62 | }
|
---|
| 63 |
|
---|
| 64 | FCKTableCommand.prototype.GetState = function()
|
---|
| 65 | {
|
---|
| 66 | return FCK_TRISTATE_OFF ;
|
---|
| 67 | } |
---|