source: sandbox/2.3-MailArchiver/expressoMail1_2/js/fckeditor/editor/_source/classes/fckstyledef.js @ 6779

Revision 6779, 1.4 KB checked in by rafaelraymundo, 12 years ago (diff)

Ticket #2946 - Liberado Expresso(branch 2.3) integrado ao MailArchiver?.

Line 
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: fckstyledef.js
14 *      FCKStyleDef Class: represents a single style definition.
15 *
16 * File Authors:
17 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
18 */
19
20var FCKStyleDef = function( name, element )
21{
22        this.Name = name ;
23        this.Element = element.toUpperCase() ;
24        this.IsObjectElement = FCKRegexLib.ObjectElements.test( this.Element ) ;
25        this.Attributes = new Object() ;
26}
27
28FCKStyleDef.prototype.AddAttribute = function( name, value )
29{
30        this.Attributes[ name ] = value ;
31}
32
33FCKStyleDef.prototype.GetOpenerTag = function()
34{
35        var s = '<' + this.Element ;
36       
37        for ( var a in this.Attributes )
38                s += ' ' + a + '="' + this.Attributes[a] + '"' ;
39       
40        return s + '>' ;
41}
42
43FCKStyleDef.prototype.GetCloserTag = function()
44{
45        return '</' + this.Element + '>' ;
46}
47
48
49FCKStyleDef.prototype.RemoveFromSelection = function()
50{
51        if ( FCKSelection.GetType() == 'Control' )
52                this._RemoveMe( FCK.ToolbarSet.CurrentInstance.Selection.GetSelectedElement() ) ;
53        else
54                this._RemoveMe( FCK.ToolbarSet.CurrentInstance.Selection.GetParentElement() ) ;
55}
Note: See TracBrowser for help on using the repository browser.