Top Description Inners Fields Constructors Methods
com.vladsch.flexmark.html

public Class HtmlRenderer

extends Object
implements IRender
Class Inheritance
All Implemented Interfaces
com.vladsch.flexmark.util.ast.IRender
Annotations
@SuppressWarnings:WeakerAccess
Imports
com.vladsch.flexmark.ast.HtmlBlock, .HtmlInline, com.vladsch.flexmark.html.renderer.*, com.vladsch.flexmark.util.ast.Document, .IRender, .Node, com.vladsch.flexmark.util.builder.BuilderBase, com.vladsch.flexmark.util.data.*, com.vladsch.flexmark.util.dependency.DependencyResolver, com.vladsch.flexmark.util.format.TrackedOffset, .TrackedOffsetUtils, com.vladsch.flexmark.util.html.Attributes, .MutableAttributes, com.vladsch.flexmark.util.misc.Extension, .Pair, com.vladsch.flexmark.util.sequence.Escaping, .LineAppendable, .TagRange, org.jetbrains.annotations.NotNull, .Nullable, java.util.*

Renders a tree of nodes to HTML.

Start with the builder method to configure the renderer. Example:


HtmlRenderer renderer = HtmlRenderer.builder().escapeHtml(true).build();
renderer.render(node);

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
HtmlRenderer.Builder

Builder for configuring an HtmlRenderer.

public static interface
private class

Field Summary

Modifier and TypeField and Description
pack-priv final List<AttributeProviderFactory>
public static final NullableDataKey<String>
public static final NullableDataKey<String>
public static final int
public static final int
CONVERT_TABS

Deprecated
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final NullableDataKey<String>
public static final NullableDataKey<String>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<HashMap<String, String>>
public static final DataKey<String>
public static final DataKey<String>
public static final DataKey<String>
public static final int
FORMAT_ALL

Deprecated
public static final int
FORMAT_ALL_OPTIONS

Deprecated
public static final int
public static final int
public static final DataKey<Integer>
FORMAT_FLAGS

output control for FormattingAppendable, see LineAppendable#setOptions(int)

public static final int
public static final DataKey<Boolean>
public static final DataKey<String>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<String>
public static final DataKey<Boolean>
public static final DataKey<String>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
pack-priv final HeaderIdGeneratorFactory
pack-priv final HtmlRendererOptions
public static final DataKey<Integer>
public static final NullableDataKey<String>
pack-priv final List<LinkResolverFactory>
public static final DataKey<Integer>
public static final DataKey<Integer>
public static final DataKey<Boolean>
pack-priv final List<DelegatingNodeRendererFactoryWrapper>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
pack-priv final DataHolder
public static final int
PASS_THROUGH

Deprecated
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<List<Pair<String, String>>>
RENDERER_TYPE_EQUIVALENCE

Stores pairs of equivalent renderer types to allow extensions to resolve types not known to them

Pair contains: rendererType, equivalentType

public static final DataKey<String>
public static final DataKey<String>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final NullableDataKey<String>
public static final NullableDataKey<String>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final DataKey<Boolean>
public static final int
public static final DataKey<String>
public static final DataKey<ArrayList<TagRange>>
public static final DataKey<List<TrackedOffset>>
public static final DataKey<String>
public static final DataKey<Boolean>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public static @NotNull MutableDataHolder
addRenderTypeEquivalence(@NotNull MutableDataHolder options, @NotNull String rendererType, @NotNull String supportedRendererType)

public static @NotNull HtmlRenderer.Builder

Returns:

a builder
builder
()

Create a new builder for configuring an HtmlRenderer.

public static @NotNull HtmlRenderer.Builder

Returns:

a builder
builder
(@Nullable DataHolder
initialization options
options
)

Create a new builder for configuring an HtmlRenderer.

public @NotNull DataHolder
getOptions()

Implements com.vladsch.flexmark.util.ast.IRender.getOptions.

Get Options for parsing

public static boolean
public static boolean
isCompatibleRendererType(@NotNull MutableDataHolder options, @NotNull String rendererType, @NotNull String supportedRendererType)

public void
render(@NotNull Node
node to render
node
,
@NotNull Appendable
appendable to use for the output
output
)

Render a node to the appendable

public void
render(@NotNull Node
node to render
node
,
@NotNull Appendable
appendable to use for the output
output
,
int maxTrailingBlankLines)

Render a node to the appendable

public @NotNull String

Returns:

the rendered HTML.
render
(@NotNull Node
the root node
node
)

Render the tree of nodes to HTML.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait