Class EmbeddedAttributeProvider
- java.lang.Object
-
- com.vladsch.flexmark.html.EmbeddedAttributeProvider
-
- All Implemented Interfaces:
AttributeProvider
public class EmbeddedAttributeProvider extends Object implements AttributeProvider
Provider which will provide attributes stored in the node's firstEmbeddedAttributeProvider.EmbeddedNodeAttributes
of the node's children
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EmbeddedAttributeProvider.EmbeddedNodeAttributes
-
Field Summary
Fields Modifier and Type Field Description static IndependentAttributeProviderFactory
Factory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setAttributes(@NotNull com.vladsch.flexmark.util.ast.Node node, @NotNull AttributablePart part, @NotNull com.vladsch.flexmark.util.html.MutableAttributes attributes)
Set the attributes for the node by modifying the provided map.
-
-
-
Field Detail
-
Factory
public static final IndependentAttributeProviderFactory Factory
-
-
Method Detail
-
setAttributes
public void setAttributes(@NotNull @NotNull com.vladsch.flexmark.util.ast.Node node, @NotNull @NotNull AttributablePart part, @NotNull @NotNull com.vladsch.flexmark.util.html.MutableAttributes attributes)
Description copied from interface:AttributeProvider
Set the attributes for the node by modifying the provided map.This allows to change or even removeIndex default attributes. With great power comes great responsibility.
The attribute key and values will be escaped (preserving character entities), so don't escape them here, otherwise they will be double-escaped.
Also used to get the id attribute for the node. Specifically for heading nodes. When the part parameter is AttributablePart.ID only need to check and provide an id attribute.
When part is AttributablePart.LINK then attributes are being requested for a Link or Image link, link status after link resolution will be found under the Attribute.LINK_STATUS. Core defines LinkStatus.UNKNOWN,LinkStatus.VALID,LinkStatus.NOT_FOUND. Extensions can define more.
AttributablePart.NODE is a generic placeholder when the node did not provide a specific part for attribution.
- Specified by:
setAttributes
in interfaceAttributeProvider
- Parameters:
node
- the node to set attributes forpart
- attributes for the specific part of the node being generated, Core defines AttributablePart.LINK, AttributablePart.ID and generic AttributablePart.NODE, extensions are free to define moreattributes
- the attributes, with any default attributes already set in the map
-
-