| AppletEditor |
The AppletEditor is a Java applet based WYSIWYG text editor producing XML content.
The following sections describe attributes, child elements, and parent elements.
Attribute | Description |
|---|---|
label | Creates a label tag next to the applet tag. |
labelposition | Where to place the label tag, "left" or "right"; default: left. |
id | id attribute of the hidden input receiving the applet's XML content. It determines the id attribute of several other tags:
|
name | the name of the hidden input receiving the applet's XML content; if omitted, will default to the id attribute |
width | width of the applet's viewport. Default: 630 |
height | height of the applet's viewport. Default: 400 |
sizeMax | maximum length in characters for the XML content. Default: unlimited |
font | default applet's font name. Default: system default font |
config | the name of a NameValueFileSectionHandler configuration section which must contain the following keys:
|
init | XPath attribute containing the content to be displayed by the applet after loading. Default: empty |
medias | if true, a link to a media creation popup will be placed below the applet. Default: false |
preview | if true, a link to a preview popup will be placed below the applet. Default: false |
create-directory | if true, the user will be able to create directories to store his medias in the media popup. Default: false |
media-tree-root | if set, defines the tree value from which the media popup will display the medias stored in the database. Default: empty |
None.
Element | Description |
|---|---|
any xhtml or xsl tag |
The XHTML structure created by the acs:AppletEditor is the following:
<div class="appletcontainer"> <!-- if labelposition=left --> <label for="applet_{@id}">label</label> <input type="hidden" id="{@id}"/> <applet id="applet_{@id}"> </applet> <!-- if labelposition=right --> <label for="applet_{@id}">label</label> <div class="appletpanel"> <!-- if medias=true --> <img class="button" id="applet_{@id}_createimage" src="{$root}img/applet_createimage.gif"/> <!-- if preview=true --> <img class="button" id="applet_{@id}_preview" src="{$root}img/applet_preview.gif"/> </div> </div>
This will create a text editor with the "Content" label, a media creation popup link, starting at the first son of the media tree root.
<acs:AppletEditor id="content" init="{DOCUMENT/CONTENT}" label="Content" medias="true" media-tree-root="000000000"/>