public interface NodeFormatterContext
| Modifier and Type | Method and Description |
|---|---|
Node |
getCurrentNode() |
Document |
getDocument() |
FormatterOptions |
getFormatterOptions() |
FormattingPhase |
getFormattingPhase() |
MarkdownWriter |
getMarkdown() |
DataHolder |
getOptions()
Get the current rendering context
DataHolder. |
NodeFormatterContext |
getSubContext(Appendable out)
Creates a child rendering context that can be used to collect rendered html text.
|
Iterable<? extends Node> |
nodesOfType(Class<?>[] classes)
Get iterable of nodes of given types, in order of their appearance in the document tree, depth first traversal.
|
Iterable<? extends Node> |
nodesOfType(Collection<Class<?>> classes) |
void |
render(Node node)
Render the specified node and its children using the configured renderers.
|
void |
renderChildren(Node parent)
Render the children of the node, used by custom renderers
|
Iterable<? extends Node> |
reversedNodesOfType(Class<?>[] classes)
Get iterable of nodes of given types, in reverse order of their appearance in the document tree, depth first traversal.
|
Iterable<? extends Node> |
reversedNodesOfType(Collection<Class<?>> classes) |
MarkdownWriter getMarkdown()
NodeFormatterContext getSubContext(Appendable out)
out - appendable to use for generated htmlvoid render(Node node)
node - the node to rendervoid renderChildren(Node parent)
parent - node the children of which are to be renderedFormattingPhase getFormattingPhase()
DataHolder getOptions()
DataHolder. These are the options passed or set on the Formatter.builder() or passed to Formatter.builder(DataHolder).
To get the document options you should use getDocument() as the data holder.DataHolderFormatterOptions getFormatterOptions()
FormatterOptions for the context.Node getCurrentNode()
Iterable<? extends Node> nodesOfType(Class<?>[] classes)
NodeFormatter.getNodeClasses() of all loaded extensions
will be available to formatters.
CoreNodeFormatter registers RefNode
if Formatter.REFERENCE_SORT is set to
ElementPlacementSort.SORT_UNUSED_LAST so that
classes - node classes to returnIterable<? extends Node> nodesOfType(Collection<Class<?>> classes)
Iterable<? extends Node> reversedNodesOfType(Class<?>[] classes)
NodeFormatter.getNodeClasses() of all loaded extensions
will be available to formatters.
CoreNodeFormatter registers RefNode
if Formatter.REFERENCE_SORT is set to
ElementPlacementSort.SORT_UNUSED_LAST so that
classes - node classes to returnIterable<? extends Node> reversedNodesOfType(Collection<Class<?>> classes)
Copyright © 2018. All rights reserved.