public class HtmlRenderer extends Object implements com.vladsch.flexmark.IRender
Start with the builder method to configure the renderer. Example:
HtmlRenderer renderer = HtmlRenderer.builder().escapeHtml(true).build();
renderer.render(node);
| Modifier and Type | Class and Description |
|---|---|
static class |
HtmlRenderer.Builder
Builder for configuring an
HtmlRenderer. |
static interface |
HtmlRenderer.HtmlRendererExtension
Extension for
HtmlRenderer. |
static class |
HtmlRenderer.RendererDependencies |
static class |
HtmlRenderer.RendererDependencyStage |
| Modifier and Type | Field and Description |
|---|---|
static com.vladsch.flexmark.util.options.DataKey<String> |
AUTOLINK_WWW_PREFIX |
static com.vladsch.flexmark.util.options.DataKey<String> |
CODE_STYLE_HTML_CLOSE |
static com.vladsch.flexmark.util.options.DataKey<String> |
CODE_STYLE_HTML_OPEN |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
DO_NOT_RENDER_LINKS |
static com.vladsch.flexmark.util.options.DataKey<String> |
EMPHASIS_STYLE_HTML_CLOSE |
static com.vladsch.flexmark.util.options.DataKey<String> |
EMPHASIS_STYLE_HTML_OPEN |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
ESCAPE_HTML |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
ESCAPE_HTML_BLOCKS |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
ESCAPE_HTML_COMMENT_BLOCKS |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
ESCAPE_INLINE_HTML |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
ESCAPE_INLINE_HTML_COMMENTS |
static com.vladsch.flexmark.util.options.DataKey<String> |
FENCED_CODE_LANGUAGE_CLASS_PREFIX |
static com.vladsch.flexmark.util.options.DataKey<String> |
FENCED_CODE_NO_LANGUAGE_CLASS |
static int |
FORMAT_ALL_OPTIONS |
static int |
FORMAT_COLLAPSE_WHITESPACE |
static int |
FORMAT_CONVERT_TABS |
static com.vladsch.flexmark.util.options.DataKey<Integer> |
FORMAT_FLAGS
output control for FormattingAppendable, see
FormattingAppendable.setOptions(int) |
static int |
FORMAT_SUPPRESS_TRAILING_WHITESPACE |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
GENERATE_HEADER_ID |
static com.vladsch.flexmark.util.options.DataKey<String> |
HARD_BREAK |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
HEADER_ID_GENERATOR_NO_DUPED_DASHES |
static com.vladsch.flexmark.util.options.DataKey<String> |
HEADER_ID_GENERATOR_NON_DASH_CHARS |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
HEADER_ID_GENERATOR_RESOLVE_DUPES |
static com.vladsch.flexmark.util.options.DataKey<String> |
HEADER_ID_GENERATOR_TO_DASH_CHARS |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
HTML_BLOCK_CLOSE_TAG_EOL |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
HTML_BLOCK_OPEN_TAG_EOL |
static com.vladsch.flexmark.util.options.DataKey<Integer> |
INDENT_SIZE |
static com.vladsch.flexmark.util.options.DataKey<String> |
INLINE_CODE_SPLICE_CLASS |
static com.vladsch.flexmark.util.options.DataKey<Integer> |
MAX_TRAILING_BLANK_LINES |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
OBFUSCATE_EMAIL |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
OBFUSCATE_EMAIL_RANDOM |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
PERCENT_ENCODE_URLS |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
RECHECK_UNDEFINED_REFERENCES |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
RENDER_HEADER_ID |
static com.vladsch.flexmark.util.options.DataKey<List<com.vladsch.flexmark.util.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
|
static com.vladsch.flexmark.util.options.DataKey<String> |
SOFT_BREAK |
static com.vladsch.flexmark.util.options.DataKey<String> |
SOURCE_POSITION_ATTRIBUTE |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
SOURCE_POSITION_PARAGRAPH_LINES |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
SOURCE_WRAP_HTML |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
SOURCE_WRAP_HTML_BLOCKS |
static com.vladsch.flexmark.util.options.DataKey<String> |
STRONG_EMPHASIS_STYLE_HTML_CLOSE |
static com.vladsch.flexmark.util.options.DataKey<String> |
STRONG_EMPHASIS_STYLE_HTML_OPEN |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
SUPPRESS_HTML |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
SUPPRESS_HTML_BLOCKS |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
SUPPRESS_HTML_COMMENT_BLOCKS |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
SUPPRESS_INLINE_HTML |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
SUPPRESS_INLINE_HTML_COMMENTS |
static com.vladsch.flexmark.util.options.DataKey<String> |
SUPPRESSED_LINKS |
static com.vladsch.flexmark.util.options.DataKey<ArrayList<com.vladsch.flexmark.util.sequence.TagRange>> |
TAG_RANGES |
static com.vladsch.flexmark.util.options.DataKey<String> |
TYPE |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
UNESCAPE_HTML_ENTITIES |
| Modifier and Type | Method and Description |
|---|---|
static com.vladsch.flexmark.util.options.MutableDataHolder |
addRenderTypeEquivalence(com.vladsch.flexmark.util.options.MutableDataHolder options,
String rendererType,
String supportedRendererType) |
static HtmlRenderer.Builder |
builder()
Create a new builder for configuring an
HtmlRenderer. |
static HtmlRenderer.Builder |
builder(com.vladsch.flexmark.util.options.DataHolder options)
Create a new builder for configuring an
HtmlRenderer. |
static boolean |
isCompatibleRendererType(com.vladsch.flexmark.util.options.MutableDataHolder options,
String supportedRendererType) |
static boolean |
isCompatibleRendererType(com.vladsch.flexmark.util.options.MutableDataHolder options,
String rendererType,
String supportedRendererType) |
String |
render(com.vladsch.flexmark.ast.Node node)
Render the tree of nodes to HTML.
|
void |
render(com.vladsch.flexmark.ast.Node node,
Appendable output)
Render a node to the appendable
|
void |
render(com.vladsch.flexmark.ast.Node node,
Appendable output,
int maxTrailingBlankLines)
Render a node to the appendable
|
HtmlRenderer |
withOptions(com.vladsch.flexmark.util.options.DataHolder options) |
public static final com.vladsch.flexmark.util.options.DataKey<String> SOFT_BREAK
public static final com.vladsch.flexmark.util.options.DataKey<String> HARD_BREAK
public static final com.vladsch.flexmark.util.options.DataKey<String> STRONG_EMPHASIS_STYLE_HTML_OPEN
public static final com.vladsch.flexmark.util.options.DataKey<String> STRONG_EMPHASIS_STYLE_HTML_CLOSE
public static final com.vladsch.flexmark.util.options.DataKey<String> EMPHASIS_STYLE_HTML_OPEN
public static final com.vladsch.flexmark.util.options.DataKey<String> EMPHASIS_STYLE_HTML_CLOSE
public static final com.vladsch.flexmark.util.options.DataKey<String> CODE_STYLE_HTML_OPEN
public static final com.vladsch.flexmark.util.options.DataKey<String> CODE_STYLE_HTML_CLOSE
public static final com.vladsch.flexmark.util.options.DataKey<String> INLINE_CODE_SPLICE_CLASS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> PERCENT_ENCODE_URLS
public static final com.vladsch.flexmark.util.options.DataKey<Integer> INDENT_SIZE
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> ESCAPE_HTML
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> ESCAPE_HTML_BLOCKS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> ESCAPE_HTML_COMMENT_BLOCKS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> ESCAPE_INLINE_HTML
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> ESCAPE_INLINE_HTML_COMMENTS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> SUPPRESS_HTML
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> SUPPRESS_HTML_BLOCKS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> SUPPRESS_HTML_COMMENT_BLOCKS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> SUPPRESS_INLINE_HTML
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> SUPPRESS_INLINE_HTML_COMMENTS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> SOURCE_WRAP_HTML
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> SOURCE_WRAP_HTML_BLOCKS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> HEADER_ID_GENERATOR_RESOLVE_DUPES
public static final com.vladsch.flexmark.util.options.DataKey<String> HEADER_ID_GENERATOR_TO_DASH_CHARS
public static final com.vladsch.flexmark.util.options.DataKey<String> HEADER_ID_GENERATOR_NON_DASH_CHARS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> HEADER_ID_GENERATOR_NO_DUPED_DASHES
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> RENDER_HEADER_ID
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> GENERATE_HEADER_ID
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> DO_NOT_RENDER_LINKS
public static final com.vladsch.flexmark.util.options.DataKey<String> FENCED_CODE_LANGUAGE_CLASS_PREFIX
public static final com.vladsch.flexmark.util.options.DataKey<String> FENCED_CODE_NO_LANGUAGE_CLASS
public static final com.vladsch.flexmark.util.options.DataKey<String> SOURCE_POSITION_ATTRIBUTE
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> SOURCE_POSITION_PARAGRAPH_LINES
public static final com.vladsch.flexmark.util.options.DataKey<String> TYPE
public static final com.vladsch.flexmark.util.options.DataKey<ArrayList<com.vladsch.flexmark.util.sequence.TagRange>> TAG_RANGES
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> RECHECK_UNDEFINED_REFERENCES
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> OBFUSCATE_EMAIL
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> OBFUSCATE_EMAIL_RANDOM
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> HTML_BLOCK_OPEN_TAG_EOL
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> HTML_BLOCK_CLOSE_TAG_EOL
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> UNESCAPE_HTML_ENTITIES
public static final com.vladsch.flexmark.util.options.DataKey<String> AUTOLINK_WWW_PREFIX
public static final com.vladsch.flexmark.util.options.DataKey<String> SUPPRESSED_LINKS
public static final com.vladsch.flexmark.util.options.DataKey<Integer> FORMAT_FLAGS
FormattingAppendable.setOptions(int)public static final com.vladsch.flexmark.util.options.DataKey<Integer> MAX_TRAILING_BLANK_LINES
public static final com.vladsch.flexmark.util.options.DataKey<List<com.vladsch.flexmark.util.Pair<String,String>>> RENDERER_TYPE_EQUIVALENCE
public static final int FORMAT_CONVERT_TABS
public static final int FORMAT_COLLAPSE_WHITESPACE
public static final int FORMAT_SUPPRESS_TRAILING_WHITESPACE
public static final int FORMAT_ALL_OPTIONS
public static HtmlRenderer.Builder builder()
HtmlRenderer.public static HtmlRenderer.Builder builder(com.vladsch.flexmark.util.options.DataHolder options)
HtmlRenderer.options - initialization optionspublic void render(com.vladsch.flexmark.ast.Node node,
Appendable output)
render in interface com.vladsch.flexmark.IRendernode - node to renderoutput - appendable to use for the outputpublic void render(com.vladsch.flexmark.ast.Node node,
Appendable output,
int maxTrailingBlankLines)
node - node to renderoutput - appendable to use for the outputpublic String render(com.vladsch.flexmark.ast.Node node)
render in interface com.vladsch.flexmark.IRendernode - the root nodepublic HtmlRenderer withOptions(com.vladsch.flexmark.util.options.DataHolder options)
withOptions in interface com.vladsch.flexmark.IRenderpublic static boolean isCompatibleRendererType(com.vladsch.flexmark.util.options.MutableDataHolder options,
String supportedRendererType)
public static boolean isCompatibleRendererType(com.vladsch.flexmark.util.options.MutableDataHolder options,
String rendererType,
String supportedRendererType)
Copyright © 2018. All rights reserved.