Ephox Home Page Ephox Home Page  
Search
Buy/Upgrade
 
 Developers
Developers Home
EditLive! for Java
EditLive! for Windows
System Requirements
Getting Started
Integration Samples
Articles
API Reference
EditLive! for XML
Discussion Forums

StyleElementText Property

Sets or retrieves the first STYLE element within the HEAD section of the document within EditLive!.  This property is mainly for use with content pasted into EditLive! from MS Word.

Applies To

EditLive Object

Syntax

JavaScript object.setStyleElementText( sStyleElementText );
 
[ sStyleElementText = ] object.getStyleElementType();
 

Possible Values

sStyleElementText Required.  String that contains CSS rules of the first STYLE element in the HEAD section.

This property is read/write. 

Examples

JavaScript

The following example would set the CSS style rules in the first STYLE element.

function EditLive1_onload() {
    editLive1.setEditLiveMode('HTMLString');
    editLive1.setStyleElementText('P.MsoNormal { FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: Arial; 12.0pt}');
}

The following example would show a message box with the current value of the STYLE element.

function button1_onclick(){
    var sStyleElementText = editLive1.getStyleElementText();
    alert(sStyleElementText);
}

Remarks

This property ignores any CSS rules defined by an external style sheet using a LINK tag.  

The getStyleElementText property will return blank if no STYLE elements exist  in the document.

Minimum Version

EditLive! 2.0 or greater.

See Also

 

 

Copyright © 1999-2005 Ephox Corporation. All Rights Reserved. 'Ephox' is a registered trademark of Ephox Corporation.
Java and the Java Powered logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.