This element provides the HTML filter settings for use within EditLive!.

Configuration Element Tree Structure

<editLive>
<htmlFilter>

<editLive>
     ...
     <htmlFilter ... />
     ...
</editLive>

Required Attributes

wrapLength

Specifies the number of characters for each line within the HTML source.

Setting the wrapLength to zero (0) turns wrapping off within the HTML source.

Optional Attributes

These attributes are all booleans and can only be true or false.

indentContent

This option specifies that EditLive! will indent the content of appropriate tags, thus creating well-formatted HTML source code. If left blank the default value will be used.

Default Value: true

logicalEmphasis

If set to true, <B> tags will be replaced by <STRONG> tags and <I> tags will be replaced by <EM> tags. If left blank the default value will be used.

Default Value: true

numericEntities

If set to true, entities such as   are converted to numeric entities (eg  ). The default value depends on the use of outputXHTML or outputXML.

Default Value

  • When outputXHTML or outputXML are set to true: true
  • Otherwise: false
outputXHTML

If set to true, output is created as XHTML. If left blank the default value will be used. When set to true, numericEntities is also set to true by default.

Default Value: false

outputXML

If set to true, output is created as XML. If left blank the default value will be used. When set to true, numericEntities is also set to true by default.

Default Value: false

xhtmlStrict

If set to true, the editor removes settings for values which are not allowed in XHTML strict:

  • In the "List Properties" dialog, the settings for "start" and "value" are removed
  • In the "Hyperlink" dialog, the setting for "target" is removed

Default Value: false

uppercaseTags

If set to true, tags will be in uppercase within the source. If left blank the default value will be used.

Default Value: true

quoteMarks

If set to true, quotation marks (") will be escaped and therefore appear as ". If left blank the default value will be used.

Default Value: true

encloseText

If set to true, content will be automatically be wrapped with paragraph (<p>) tags if it has not been properly enclosed with block tags. This is done to ensure that the content inside EditLive! is valid.

Default Value: true

Ephox does not recommend setting this attribute to false as it may cause invalid HTML to be generated.

allowUnknownTags

If set to true, tags not recognised in HTML or XHTML will be interpreted as custom tags inside EditLive!. This will preserve the unknown tags. When set to false unknown tags will be HTML encoded (e.g. <unknownTag> would be converted to <UnknownTag>).

Default Value: true

When producing XHTML output, allowing unknown tags to be preserved in the content may cause errors in validating the resulting XHTML. If the XHTML produced by EditLive! is to be run through a validation process then it is recommended that this attribute be set to false.

wrapCustomTagsInP

If set to true, any custom tag specified outside of a block element will be automatically wrapped in a <P> tag.

Default Value: true

Example

The following example demonstrates how to set the various attributes of the <htmlFilter> element.

<editLive>
    ...
    <htmlFilter wrapLength="68" indentContent="true" logicalEmphasis="true" />
    ...
</editLive>

Remarks

To ensure EditLive! provides valid XHTML content where required, ensure that allowUnknownTags is set to false and outputXHTML is set to true.

The <htmlFilter> element can appear only once within the <editLive> element.

If the <htmlFilter> element is to be left blank then the element must be a complete tag; it cannot contain a tag body. Therefore, the tag must be closed in the same line. It should appear as below:

<htmlFilter wrapLength=... />