Markdown from an attachment macro - Cloud

The Markdown from an attachment macro renders Markdown content from attachments located in the same or different pages and/or spaces. 

The Markdown content is rendered based on the permissions of the page and/or space. Any attachment available in a public location can be accessed and the Markdown content can be rendered. Currently, any links or images in Markdown content referring to a private repository, or a location that must be logged in to, cannot be accessed and thus, rendered; watch this ticket for updates.

Basic use

This macro can be deployed using one of the following methods:

Selected from the Macro BrowserMarkdown from an attachment
Markup Shortcut{markdown-attachment}


Macro specific parameters

Macro Editor LabelDefaultDescriptionMacro Parameter
Page for attachmentAttachment on the same page

Enter the page and/or space name, that contains Markdown content, in the text box.

Name of attachment<required>

Enter the name and the extension of the file with the Markdown content in the text box. This is a mandatory field.

The following Markdown file extensions are applicable:

  • markdown
  • md
  • mdown
  • mkdn
  • mkd
  • mdwn
  • mdtext
  • txt
  • text
File encodingUTF-8

Specify the encoding for an external file, if different from the default system handling.


Common parameters

The following parameters are available for all Markdown macros:

Macro Editor LabelDefaultDescriptionMacro 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)


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

Allow HTML tagsfalseSelect this option to allow HTML tags in the macro body. The option is deselected by default. allowHtml
Hard wrap newlinestrue

Select this option to display content on separate lines. This is a GitHub Flavored Markdown extension and is selected by default.

TextHard wrap (selected)Soft wrap (Hard wrap not selected)
Roses are red
Violets are blue
Roses are red
Violets are blue
Roses are red Violets are blue
Table class@default

Specify the table class (CSS) to apply to render tables.

  • @default - Apply the default Confluence table class to rendered tables.
  • @none - Do not apply any style to rendered tables.

Currently, Confluence Cloud does not support the use of custom user-defined styles.