tinymce.html.Writer

Namespace tinymce.html
Class Writer
This class is used to write HTML tags out it can be used with the Serializer or the SaxParser.
Version:3.4

Example

Public Methods

Method Defined By
Writer(settings:Object)
Constructs a new Writer instance.
Writer
cdata(text:String):void
Writes a cdata node such as .
Writer
cdata(text:String):void
Writes a comment node such as .
Writer
doctype(text:String):void
Writes a doctype node such as .
Writer
end(name:String):void
Writes the a end element such as .
Writer
getContent():String
Returns the contents that got serialized.
Writer
pi(name:String, text:String):void
Writes a PI node such as .
Writer
reset():void
Resets the internal buffer if one wants to reuse the writer.
Writer
start(name:String, attrs:Array, empty:Boolean):void
Writes the a start element such as .
Writer
text(text:String, raw:Boolean):void
Writes a text node.
Writer

Method details

Writerconstructor

public function Writer(settings:Object)
Constructs a new Writer instance.

Parameters

settings:Object Name/value settings object.

cdatamethod

public function cdata(text:String):void
Writes a cdata node such as .

Parameters

text:String String to write out inside the cdata.

cdatamethod

public function cdata(text:String):void
Writes a comment node such as .

Parameters

text:String String to write out inside the comment.

doctypemethod

public function doctype(text:String):void
Writes a doctype node such as .

Parameters

text:String String to write out inside the doctype.

endmethod

public function end(name:String):void
Writes the a end element such as

.

Parameters

name:String Name of the element.

getContentmethod

public function getContent():String
Returns the contents that got serialized.

Returns

String - HTML contents that got written down.

pimethod

public function pi(name:String, text:String):void
Writes a PI node such as .

Parameters

name:String Name of the pi.
text:String String to write out inside the pi.

resetmethod

public function reset():void
Resets the internal buffer if one wants to reuse the writer.

startmethod

public function start(name:String, attrs:Array, empty:Boolean):void
Writes the a start element such as

.

Parameters

name:String Name of the element.
attrs:Array Optional attribute array or undefined if it hasn't any.
empty:Boolean Optional empty state if the tag should end like <br />.

textmethod

public function text(text:String, raw:Boolean):void
Writes a text node.

Parameters

text:String String to write out.
raw:Boolean Optional raw state if true the contents wont get encoded.