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