This function, when given a string of relevant name-value pairs, sets the attributes for an instance of a specific tag within EditLive! for Java. For more information on how to use custom properties dialogs with EditLive! for Java please see Custom Properties Dialogs for EditLive! for Java.
Note: This function is only for use in conjunction with the custom properties dialog.
JavaScript object.SetProperties(strProperties)
strProperties Required. This string provides a list of list or name-value pairings of attributes for the relevant HTML tag. Each name and value for each pairing must be delimited by a "=" character. Name-value pairings must be delimited by a "\n" character.
Note: This string must be encoded. This can be done done using the JavaScript escape function.
The following sets the properties for an instance of a tag inside an instance of EditLive! for Java named editlivejava1.
Note: For the SetProperties function to have any effect it must be used in conjunction with the custom properties dialog functionality of EditLive! for Java.
//set up an instance of EditLive! for Java
var editlivejava1;
editlivejava1 = new EditLiveJava("eljava",700,400);
editlivejava1.setDownloadDirectory("editlivejava");
editlivejava1.setLocalDeployment(false);
editlivejava1.setXMLURL("sample_eljconfig.xml");
editlivejava1.show();
...
//create a function which sets properties
function setNewProperties(newProperties){
editlivejava1.SetProperties(newProperties);
}
This function is only for use in conjunction with the custom properties dialog functionality of EditLive! for Java.
Each name and value for each pairing must be delimited by a "=" character.
Name-value pairings must be delimited by a "\n" character.
In order to correctly set the properties of the relevant tag it should be ensured that the ephoxTagID attribute is not altered by the functions external to EditLive! for Java. Also, the tag attribute must be present and the value of this attribute must correspond to the name of the tag (i.e. "span" for a <span> tag).
The value of the attribute with the name of tag designates the type of tag for which the properties are relevant. Changing the value of the tag attribute will change the tag type in EditLive! for Java. Thus, if the value of a tag attribute with the value td was changed to th then the relevant table cell would be changed from a normal (td) cell to a table header (th) cell.
The tag for which the custom properties dialog applies may contain standalone attributes. These are attributes which have only a name and do not exist as a name-value pairing. For example, the NOWRAP attribute of the <td> tag. In order to add such an attribute to the properties string a name-value pair in which the name and value are the same (e.g. NOWRAP=NOWRAP) should be added to the properties string.
Copyright © 2003 Ephox Corporation. All Rights Reserved.