tinymce.dom.Serializer
This class is used to serialize DOM trees into a string. Consult the TinyMCE API Documentation for more details and examples on how to use this class.
Summary
Methods
Name | Summary | Defined by |
---|---|---|
Adds a attribute filter function to the parser used by the serializer, the parser will collect nodes that has the specified attributes and then execute the callback once it has finished parsing the document. |
||
Adds a node filter function to the parser used by the serializer, the parser will collect the specified nodes by name and then execute the callback once it has finished parsing the document. |
||
Adds valid elements rules to the serializers schema instance this enables you to specify things like what elements should be outputted and what attributes specific elements might have. Consult the TinyMCE Documentation for more details on this format. |
||
Adds a temporary internal attribute these attributes will get removed on undo and when getting contents out of the editor. |
||
Returns an array of all added temp attrs names. |
||
Serializes the specified browser DOM node into a HTML string. |
||
Sets the valid elements rules to the serializers schema instance this enables you to specify things like what elements should be outputted and what attributes specific elements might have. Consult the TinyMCE Documentation for more details on this format. |
Methods
addAttributeFilter()
addAttributeFilter(callback: function)
Adds a attribute filter function to the parser used by the serializer, the parser will collect nodes that has the specified attributes and then execute the callback once it has finished parsing the document.
addNodeFilter()
addNodeFilter(callback: function)
Adds a node filter function to the parser used by the serializer, the parser will collect the specified nodes by name and then execute the callback once it has finished parsing the document.
addRules()
addRules(rules: String)
Adds valid elements rules to the serializers schema instance this enables you to specify things like what elements should be outputted and what attributes specific elements might have. Consult the TinyMCE Documentation for more details on this format.
addTempAttr()
addTempAttr(name: String)
Adds a temporary internal attribute these attributes will get removed on undo and when getting contents out of the editor.
serialize()
serialize(node: DOMNode, args: Object)
Serializes the specified browser DOM node into a HTML string.