public class TocExtension extends Object implements Parser.ParserExtension, HtmlRenderer.HtmlRendererExtension
Create it with create() and then configure it on the builders
(Parser.Builder.extensions(Iterable),
HtmlRenderer.Builder.extensions(Iterable)).
The parsed [TOC] text is turned into TocBlock nodes.
Rendered into table of contents based on the headings in the document
| Modifier and Type | Field and Description |
|---|---|
static DataKey<Boolean> |
AST_INCLUDE_OPTIONS |
static DataKey<Boolean> |
BLANK_LINE_SPACER |
static DataKey<TocOptions> |
FORMAT_OPTIONS |
static DataKey<SimTocGenerateOnFormat> |
FORMAT_UPDATE_ON_FORMAT |
static DataKey<Boolean> |
IS_HTML |
static DataKey<Boolean> |
IS_NUMBERED |
static DataKey<Boolean> |
IS_TEXT_ONLY |
static DataKey<Integer> |
LEVELS |
static DataKey<TocOptions.ListType> |
LIST_TYPE |
static DataKey<String> |
TITLE |
static DataKey<Integer> |
TITLE_LEVEL |
EMPTY_LIST, EMPTY_SET| Modifier and Type | Method and Description |
|---|---|
static Extension |
create() |
void |
extend(HtmlRenderer.Builder rendererBuilder,
String rendererType) |
void |
extend(Parser.Builder parserBuilder) |
void |
parserOptions(MutableDataHolder options) |
void |
rendererOptions(MutableDataHolder options) |
public static final DataKey<TocOptions.ListType> LIST_TYPE
public static final DataKey<SimTocGenerateOnFormat> FORMAT_UPDATE_ON_FORMAT
public static final DataKey<TocOptions> FORMAT_OPTIONS
public static Extension create()
public void rendererOptions(MutableDataHolder options)
rendererOptions in interface HtmlRenderer.HtmlRendererExtensionpublic void parserOptions(MutableDataHolder options)
parserOptions in interface Parser.ParserExtensionpublic void extend(Parser.Builder parserBuilder)
extend in interface Parser.ParserExtensionpublic void extend(HtmlRenderer.Builder rendererBuilder, String rendererType)
extend in interface HtmlRenderer.HtmlRendererExtensionCopyright © 2018. All rights reserved.