public class SimTocExtension extends Object implements Parser.ParserExtension, HtmlRenderer.HtmlRendererExtension, Formatter.FormatterExtension
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 SimTocBlock 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(Formatter.Builder builder) |
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 Formatter.FormatterExtensionrendererOptions in interface HtmlRenderer.HtmlRendererExtensionpublic void parserOptions(MutableDataHolder options)
parserOptions in interface Parser.ParserExtensionpublic void extend(Formatter.Builder builder)
extend in interface Formatter.FormatterExtensionpublic 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.