CKEDITOR.htmlParser.basicWriter
class
TODO
Filtering
Methods
-
constructor() → basicWriter
CKEDITOR.htmlParser.basicWriter#constructor
-
attribute( attName, attValue )
CKEDITOR.htmlParser.basicWriter#attribute
Writes an attribute. This function should be called after opening the tag with openTagClose.
// Writes ' class="MyClass"'. writer.attribute( 'class', 'MyClass' );
Parameters
attName : String
The attribute name.
attValue : String
The attribute value.
-
closeTag( tagName )
CKEDITOR.htmlParser.basicWriter#closeTag
Writes a closer tag.
// Writes '</p>'. writer.closeTag( 'p' );
Parameters
tagName : String
The element name for this tag.
-
comment( comment )
CKEDITOR.htmlParser.basicWriter#comment
Writes a comment.
// Writes '<!-- My comment -->'. writer.comment( ' My comment ' );
Parameters
comment : String
The comment text.
-
getHtml( reset ) → String
CKEDITOR.htmlParser.basicWriter#getHtml
Empties the current output buffer.
var html = writer.getHtml();
Parameters
reset : Boolean
Indicates that the reset method is to be automatically called after retrieving the HTML.
Returns
String
The HTML written to the writer so far.
-
openTag( tagName, attributes )
CKEDITOR.htmlParser.basicWriter#openTag
Writes the tag opening part for a opener tag.
// Writes '<p'. writer.openTag( 'p', { class : 'MyClass', id : 'MyId' } );
Parameters
tagName : String
The element name for this tag.
attributes : Object
The attributes defined for this tag. The attributes could be used to inspect the tag.
-
openTagClose( tagName, isSelfClose )
CKEDITOR.htmlParser.basicWriter#openTagClose
Writes the tag closing part for a opener tag.
// Writes '>'. writer.openTagClose( 'p', false ); // Writes ' />'. writer.openTagClose( 'br', true );
Parameters
tagName : String
The element name for this tag.
isSelfClose : Boolean
Indicates that this is a self-closing tag, like
<br>
or<img>
.
-
reset()
CKEDITOR.htmlParser.basicWriter#reset
-
text( text )
CKEDITOR.htmlParser.basicWriter#text
Writes text.
// Writes 'Hello Word'. writer.text( 'Hello Word' );
Parameters
text : String
The text value.
-
write( data )
CKEDITOR.htmlParser.basicWriter#write
Writes any kind of data to the ouput.
writer.write( 'This is an <b>example</b>.' );
Parameters
data : String