import rt 3.8.7
[freeside.git] / rt / share / html / NoAuth / RichText / FCKeditor / editor / _source / commandclasses / fckremoveformatcommand.js
1 /*\r
2  * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
3  * Copyright (C) 2003-2009 Frederico Caldeira Knabben\r
4  *\r
5  * == BEGIN LICENSE ==\r
6  *\r
7  * Licensed under the terms of any of the following licenses at your\r
8  * choice:\r
9  *\r
10  *  - GNU General Public License Version 2 or later (the "GPL")\r
11  *    http://www.gnu.org/licenses/gpl.html\r
12  *\r
13  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
14  *    http://www.gnu.org/licenses/lgpl.html\r
15  *\r
16  *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
17  *    http://www.mozilla.org/MPL/MPL-1.1.html\r
18  *\r
19  * == END LICENSE ==\r
20  *\r
21  * FCKRemoveFormatCommand Class: controls the execution of a core style. Core\r
22  * styles are usually represented as buttons in the toolbar., like Bold and\r
23  * Italic.\r
24  */\r
25 \r
26  var FCKRemoveFormatCommand = function()\r
27  {\r
28         this.Name = 'RemoveFormat' ;\r
29  }\r
30 \r
31  FCKRemoveFormatCommand.prototype =\r
32  {\r
33         Execute : function()\r
34         {\r
35                 FCKStyles.RemoveAll() ;\r
36 \r
37                 FCK.Focus() ;\r
38                 FCK.Events.FireEvent( 'OnSelectionChange' ) ;\r
39         },\r
40 \r
41         GetState : function()\r
42         {\r
43                 return FCK.EditorWindow ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;\r
44         }\r
45  };\r