The Markdown from an attachment macro renders Markdown content from attachments located in the same or different pages and/or spaces.
Basic Use
This macro can be deployed using one of the following methods:
Selected from the Macro Browser | Markdown from an attachment |
---|---|
Markup Shortcut | {markdown-attachment} |
Parameters
Macro specific parameters
Macro Editor Label | Default | Description | Macro Parameter |
---|---|---|---|
Page for attachment | Attachment on the same page | Enter the location where Markdown content is present.
| page |
Name of attachment | <required> | Enter the name and the extension of the file with the Markdown content. This is a mandatory field. The following Markdown file extensions are applicable:
| name |
File encoding | UTF-8 | Specify the encoding for an external file, if different from the default system handling. | encoding |
Common parameters
The following parameters are available for all Markdown macros:
Macro Editor Label | Default | Description | Macro Parameter | ||||||
---|---|---|---|---|---|---|---|---|---|
Find regex patterns | Enter a comma-separated list of regex patterns to post-process the output for Markdown content with find and replace logic. Example: (href=)(/display) | find | |||||||
Enter a comma-separated list corresponding to find patterns via index position in the list. These are single quote entries containing a comma. Example: $1$base_url$2 | replace | ||||||||
Allow HTML tags | false | Select this option to allow HTML tags in the macro body. The option is deselected by default. | allowHtml | ||||||
Hard wrap newlines | true | Select this option to display content on separate lines. This is a GitHub Flavored Markdown extension and is selected by default.
| hardwrap | ||||||
Table class | @default | Specify the table class (CSS) to apply to render tables.
Currently, Confluence Cloud does not support the use of custom user-defined styles. | tableClass |
Screenshot