public class AbbreviationExtension extends Object implements Parser.ParserExtension, HtmlRenderer.HtmlRendererExtension, Parser.ReferenceHoldingExtension, Formatter.FormatterExtension
Create it with create() then configure builders
(Parser.Builder.extensions(Iterable),
HtmlRenderer.Builder.extensions(Iterable)).
The parsed abbreviations are turned into abbr tags by default or a links as an option by setting the USE_LINKS key to true in option used to create the Parser.Builder via Parser.builder(options)
| Modifier and Type | Field and Description |
|---|---|
static DataKey<AbbreviationRepository> |
ABBREVIATIONS
A
DataKey that is used to get the document's Node repository holding all the abbreviations defined in the current document. |
static DataKey<KeepType> |
ABBREVIATIONS_KEEP
A
DataKey that is used to set the behavior of the abbreviations repository when duplicates are defined. |
static DataKey<ElementPlacement> |
ABBREVIATIONS_PLACEMENT |
static DataKey<ElementPlacementSort> |
ABBREVIATIONS_SORT |
static DataKey<Boolean> |
USE_LINKS
A
DataKey that is used to set the use links option when true, default is false and abbr tag will be used in the rendered HTML. |
EMPTY_LIST, EMPTY_SET| Constructor and Description |
|---|
AbbreviationExtension() |
| 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) |
boolean |
transferReferences(MutableDataHolder document,
DataHolder included) |
public static final DataKey<AbbreviationRepository> ABBREVIATIONS
DataKey that is used to get the document's Node repository holding all the abbreviations defined in the current document.public static final DataKey<Boolean> USE_LINKS
DataKey that is used to set the use links option when true, default is false and abbr tag will be used in the rendered HTML.public static final DataKey<ElementPlacement> ABBREVIATIONS_PLACEMENT
public static final DataKey<ElementPlacementSort> ABBREVIATIONS_SORT
public static Extension create()
public void extend(Formatter.Builder builder)
extend in interface Formatter.FormatterExtensionpublic void rendererOptions(MutableDataHolder options)
rendererOptions in interface Formatter.FormatterExtensionrendererOptions in interface HtmlRenderer.HtmlRendererExtensionpublic void parserOptions(MutableDataHolder options)
parserOptions in interface Parser.ParserExtensionpublic boolean transferReferences(MutableDataHolder document, DataHolder included)
transferReferences in interface Parser.ReferenceHoldingExtensionpublic void extend(Parser.Builder parserBuilder)
extend in interface Parser.ParserExtensionpublic void extend(HtmlRenderer.Builder rendererBuilder, String rendererType)
extend in interface HtmlRenderer.HtmlRendererExtensionCopyright © 2017. All rights reserved.