- Description:
This key defines positioning behavior of Markdown attributes for different element types when converting HTML to Markdown.
The value is an object that can contain
inline,block, or element-specific properties. Each property value specifies where attribute lists should be positioned for that element type. Valid values arenone,right,space right,below,newline below, orright-of-prefix.This key only takes effect when
attributesis enabled.- Appears in:
└── markdown └── options └── attribute_elements- Type:
Object<attribute_elements.*>- Properties:
This key defines where attribute lists are positioned for block-level elements when converting HTML to Markdown.
The value can be
none,right,space right,below,newline below, orright-of-prefix. This applies to all block-level elements unless overridden by element-specific configuration.This key only takes effect when
attributesis enabled.Allowed values:
nonerightspace rightbelownewline belowright-of-prefixShow examplesHide examples
In this example, we have configured block-level elements to place attributes below the element.
Copied to clipboardmarkdown: engine: commonmark options: attributes: true attribute_elements: block: below{ "markdown": { "engine": "commonmark", "options": { "attributes": true, "attribute_elements": { "block": "below" } } } }This key defines where attribute lists are positioned for inline elements when converting HTML to Markdown.
The value can be
none,right,space right,below,newline below, orright-of-prefix. This applies to all inline elements unless overridden by element-specific configuration.This key only takes effect when
attributesis enabled.Allowed values:
nonerightspace rightbelownewline belowright-of-prefixShow examplesHide examples
In this example, we have configured inline elements to place attributes on the right.
Copied to clipboardmarkdown: engine: commonmark options: attributes: true attribute_elements: inline: right{ "markdown": { "engine": "commonmark", "options": { "attributes": true, "attribute_elements": { "inline": "right" } } } }- Values:
This key represents an individual element-specific attribute positioning configuration in the
markdown.options.attribute_elementsobject.The value can be
none,right,space right,below,newline below, orright-of-prefix. This determines where attribute lists are positioned for the specified element type when converting HTML to Markdown.This key only takes effect when
attributesis enabled.Allowed values:
nonerightspace rightbelownewline belowright-of-prefixShow examplesHide examples
In this example, we have configured attribute positioning for paragraph elements to place attributes on the right.
Copied to clipboardmarkdown: engine: commonmark options: attributes: true attribute_elements: p: right{ "markdown": { "engine": "commonmark", "options": { "attributes": true, "attribute_elements": { "p": "right" } } } }- Examples:
In this example, we have configured attribute positioning for inline and block elements.
Copied to clipboardmarkdown: engine: commonmark options: attributes: true attribute_elements: inline: right block: below{ "markdown": { "engine": "commonmark", "options": { "attributes": true, "attribute_elements": { "inline": "right", "block": "below" } } } }