| 1 |
/* |
| 2 |
|
| 3 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
| 4 |
|
| 5 |
* Copyright (C) 2003-2009 Frederico Caldeira Knabben |
| 6 |
|
| 7 |
* |
| 8 |
|
| 9 |
* == BEGIN LICENSE == |
| 10 |
|
| 11 |
* |
| 12 |
|
| 13 |
* Licensed under the terms of any of the following licenses at your |
| 14 |
|
| 15 |
* choice: |
| 16 |
|
| 17 |
* |
| 18 |
|
| 19 |
* - GNU General Public License Version 2 or later (the "GPL") |
| 20 |
|
| 21 |
* http://www.gnu.org/licenses/gpl.html |
| 22 |
|
| 23 |
* |
| 24 |
|
| 25 |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
| 26 |
|
| 27 |
* http://www.gnu.org/licenses/lgpl.html |
| 28 |
|
| 29 |
* |
| 30 |
|
| 31 |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
| 32 |
|
| 33 |
* http://www.mozilla.org/MPL/MPL-1.1.html |
| 34 |
|
| 35 |
* |
| 36 |
|
| 37 |
* == END LICENSE == |
| 38 |
|
| 39 |
* |
| 40 |
|
| 41 |
* FCKRemoveFormatCommand Class: controls the execution of a core style. Core |
| 42 |
|
| 43 |
* styles are usually represented as buttons in the toolbar., like Bold and |
| 44 |
|
| 45 |
* Italic. |
| 46 |
|
| 47 |
*/ |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
var FCKRemoveFormatCommand = function() |
| 52 |
|
| 53 |
{ |
| 54 |
|
| 55 |
this.Name = 'RemoveFormat' ; |
| 56 |
|
| 57 |
} |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
FCKRemoveFormatCommand.prototype = |
| 62 |
|
| 63 |
{ |
| 64 |
|
| 65 |
Execute : function() |
| 66 |
|
| 67 |
{ |
| 68 |
|
| 69 |
FCKStyles.RemoveAll() ; |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
FCK.Focus() ; |
| 74 |
|
| 75 |
FCK.Events.FireEvent( 'OnSelectionChange' ) ; |
| 76 |
|
| 77 |
}, |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
GetState : function() |
| 82 |
|
| 83 |
{ |
| 84 |
|
| 85 |
return FCK.EditorWindow ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; |
| 86 |
|
| 87 |
} |
| 88 |
|
| 89 |
}; |
| 90 |
|
| 91 |
|