classafFandoc::HtmlDocWriter
sys::Obj afFandoc::HtmlDocWriter : afFandoc::DocWriter
@Js
A intelligent DocWriter with useful method override hooks. Links that cannot be resolved are rendered with an invalidLink CSS class and pre blocks are processed
- attr
- virtual Void attr(OutStream out, Str key, Obj? val)- Writes out an HTML attribute. If - valis- nulla HTML5 Boolean attribute is written out. If- valis a- Urithen it's encoded form is written out. Else- val.toStris used.- All attribute values are XML escaped. 
- cssClasses
- escapeText
- virtual override Str escapeText(DocElem elem, Str text)- Escapes the given text to XML, unless we're inside a - preblock.
- fullyLoaded
- static HtmlDocWriter fullyLoaded()- A HTML writer that performs pre-block-processing for tables and syntax colouring. 
- isVoidElem
- virtual Bool isVoidElem(DocElem elem)- Special end-tag handling for Void Elements. See Void Elements in the W3C HTML5 specification. 
- linkResolvers
- LinkResolver[] linkResolvers := LinkResolver[,]
- original
- static HtmlDocWriter original()- A simple HTML writer that mimics the original; no invalid links and no pre-block-processing. 
- preProcessors
- Str:PreProcessor preProcessors := [Str:PreProcessor][:]
- renderAttrs
- virtual Void renderAttrs(OutStream out, DocElem elem)- Renders some standard element attributes, i.e. - srcand- altfor- imgtags.- Renders an - idattribute should the element's- anchorIdnot be null.
- renderClass
- virtual Void renderClass(OutStream out, DocElem elem)- Writes out - classattributes for some common scenarios.
- renderElem
- virtual Void renderElem(OutStream out, DocElem elem, Str body)- Invokes a - PreProcessorshould a matching one be found, else defaults to calling- renderElem().
- renderPreBody
- virtual Void renderPreBody(OutStream out, DocElem elem, Str body)- Invokes a - PreProcessorshould a matching one be found, else defaults to calling- renderElem().
- resolveLink
- virtual Uri? resolveLink(DocElem elem, Str url)- Calls the - LinkResolverslooking for valid links.