tinymce.html.Writer

This class is used to write HTML tags out it can be used with the Serializer or the SaxParser.

Examples

var writer = new tinymce.html.Writer({indent: true});
var parser = new tinymce.html.SaxParser(writer).parse('<p><br></p>');
console.log(writer.getContent());

Constructors

name summary defined by
Writer() Constructs a new Writer instance. tinymce.html.Writer

Methods

name summary defined by
cdata() Writes a comment node such as . tinymce.html.Writer
doctype() Writes a doctype node such as . tinymce.html.Writer
end() Writes the a end element such as

.
tinymce.html.Writer
getContent() Returns the contents that got serialized. tinymce.html.Writer
pi() Writes a PI node such as . tinymce.html.Writer
reset() Resets the internal buffer if one wants to reuse the writer. tinymce.html.Writer
start() Writes the a start element such as

.

tinymce.html.Writer
text() Writes a text node. tinymce.html.Writer

Constructors

Writer

public constructor function Writer(settings:Object)

Constructs a new Writer instance.

Parameters

Methods

cdata

cdata(text:String)

Writes a comment node such as .

Parameters

doctype

doctype(text:String)

Writes a doctype node such as .

Parameters

end

end(name:String)

Writes the a end element such as

.

Parameters

getContent

getContent():String

Returns the contents that got serialized.

Return value

pi

pi(name:String, text:String)

Writes a PI node such as .

Parameters

reset

reset()

Resets the internal buffer if one wants to reuse the writer.

start

start(name:String, attrs:Array, empty:Boolean)

Writes the a start element such as

.

Parameters

text

text(text:String, raw:Boolean)

Writes a text node.

Parameters

Can't find what you're looking for? Let us know.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.