TinyMCE_Cleanup

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class TinyMCE_Cleanup

    Object
       |
       +--TinyMCE_Cleanup

class TinyMCE_Cleanup

Defined in TinyMCE_Cleanup.class.js

Constructor Summary
`TinyMCE_Cleanup ()` TinyMCE_Cleanup class.

Method Summary
`void` | `addRuleStr(<string> s)` Adds a cleanup rule string, for TinyMCE_Cleanup.prototype.example = a;[href|name|title=title|class=class1?class2?class3].
`string` | `formatHTML(<string> h)` Applies source formatting/indentation on the specified HTML string.
`void` | `init(<Array> s)` Initializes the cleanup engine with the specified config.
`Array` | `parseRuleStr(<string> s)` Parses a cleanup rule string, for TinyMCE_Cleanup.prototype.example = a;[href|name|title=title|class=class1?class2?class3].
`string` | `serializeNodeAsHTML(<HTMLNode> n)` Serializes the specified node as a XHTML string.
`string` | `serializeNodeAsXML(<HTMLNode> n)` Serializes the specified node as a HTML string.
`string` | `split(<RegEx> re, <string> s)` Splits the specified string and removed empty chunks.
`string` | `xmlEncode(<string> s)` XML Encodes the specified string based on configured entity encoding.

Constructor Detail

### TinyMCE_Cleanup

    TinyMCE_Cleanup()

TinyMCE_Cleanup class.

Method Detail

### addRuleStr

    void addRuleStr(<string> s)

Adds a cleanup rule string, for TinyMCE_Cleanup.prototype.example = a;[href|name|title=title|class=class1?class2?class3]. These rules are then used when serializing the DOM tree as a HTML string, it gives the possibility to control the valid elements and attributes and force attribute values or default them.

Parameters:

`s` - Rule string to parse and add to the cleanup rules array.

### formatHTML

    string formatHTML(<string> h)

Applies source formatting/indentation on the specified HTML string.

Parameters:

`h` - HTML string to apply formatting to.

Returns:

Formatted HTML string.

### init

    void init(<Array> s)

Initializes the cleanup engine with the specified config.

Parameters:

`s` - Name/Value array with config settings.

### parseRuleStr

    Array parseRuleStr(<string> s)

Parses a cleanup rule string, for TinyMCE_Cleanup.prototype.example = a;[href|name|title=title|class=class1?class2?class3]. These rules are then used when serializing the DOM tree as a HTML string, it gives the possibility to control the valid elements and attributes and force attribute values or default them.

Parameters:

`s` - Rule string to parse as a name/value rule array.

Returns:

Parsed name/value rule array.

### serializeNodeAsHTML

    string serializeNodeAsHTML(<HTMLNode> n)

Serializes the specified node as a XHTML string. This uses the TinyMCE serializer logic since it gives more control over the output than the build in browser XML serializer.

Parameters:

`n` - Node to serialize as a XHTML string.

Returns:

Serialized XHTML string based on specified node.

### serializeNodeAsXML

    string serializeNodeAsXML(<HTMLNode> n)

Serializes the specified node as a HTML string. This uses the XML parser and serializer to generate a XHTML string.

Parameters:

`n` - Node to serialize as a XHTML string.

Returns:

Serialized XHTML string based on specified node.

### split

    string split(<RegEx> re, <string> s)

Splits the specified string and removed empty chunks.

Parameters:

`re` - RegEx to split string by.

`s` - String value to split.

Returns:

Array with parts from specified string.

### xmlEncode

    string xmlEncode(<string> s)

XML Encodes the specified string based on configured entity encoding. The entity encoding modes are raw, numeric and named. Where raw is the fastest and named is default.

Parameters:

`s` - String to convert to XML.

Returns:

Encoded XML string based on configured entity encoding.

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Fri Apr 14 21:59:23 2006