Click or drag to resize
HtmlEditor

The HtmlEditor is WYSIWYG editor based on CKEditor. By default, the version is 3.0.1, but if you put the string "ckeditor4" in the jslibraries section, the version will be upgraded to 4.3.1.

The HtmlEditor does not have an init attribute; the initialization content must be placed inside the HtmlEditor tag.

It uses the same media upload popup as the AppletEditor.

Attributes and elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

label

Creates a label tag next to the editor.

labelposition

Where to place the label tag, "left" or "right"; default: left.

id

id of the editor

name

the name of the editor; if omitted, will default to the id attribute

config

the name of a NameValueFileSectionHandler configuration section which must contain the following keys:

dbSection

database configuration section used to read the style and links list. Default: db

appletConfigTable

table containing the link list. Default: APPLETBLOBCONFIG

styleTable

table containing the style list. Default: STYLE

create-directory

XPath attribute; if true, the user will be able to create directories to store his medias in the media popup. Default: false

media-tree-root

XPath attribute; if set, defines the tree value from which the media popup will display the medias stored in the database. Default: empty

skin

XPath attribute; CKEditor skin used. Default: kama

width

XPath attribute; editor's width. Default: 100%

height

XPath attribute; editor's height. Default: 350px

contentsCss

XPath attribute; a string or a string array of css file paths to be used by the editor to render its content.

Child elements

any xhtml or xsl tag, used to initialize the editor's content.

Parent elements

Element

Description

any xhtml or xsl tag

Styling information

See the CKEditor web site.

Examples
<acs:HtmlEditor id="myeditor">
  <xsl:call-template name="displayHTML">
    <xsl:with-param name="xpath" select="QUESTION/ANSWER" />
  </xsl:call-template>
</acs:HtmlEditor>
<xsl:template name="displayHTML">
  <xsl:param name="xpath" />
  <xsl:choose>
    <xsl:when test="$xpath/*">
      <xsl:copy>
        <xsl:apply-templates select="$xpath/*" mode="displayHTML" />
      </xsl:copy>
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="$xpath" disable-output-escaping="yes" />
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
<xsl:template match="@* | node()" mode="displayHTML">
  <xsl:copy>
    <xsl:apply-templates select="node() | @* | text()" mode="displayHTML" />
  </xsl:copy>
</xsl:template>
<xsl:template match="text()" mode="displayHTML">
  <xsl:value-of disable-output-escaping="yes" select="." />
</xsl:template>