Skip to end of banner
Go to start of banner

Markdown from a URL macro - Cloud

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

The Markdown from a URL macro renders Markdown content from URLs or from profiles. Profiles are a means of retrieving data from other external sources such as other applications or even databases. You can read more about profiles from this link.

Basic use

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

Selected from the Macro BrowserMarkdown from a URL
Markup Shortcut{markdown-url}

Parameters

Macro specific parameters

Macro Editor LabelDefaultDescriptionMacro Parameter
Profile

Enter a profile name. Administrators set up profiles to connect to other applications such as GitHub or GitLab.

Contact your administrator to know more about the profiles used in your instance. To know more about how profiles are configured, refer to this link.

profile
URL to markdown file

Enter the relative path to the Markdown file(s) to be displayed. If a valid path is entered here, the macro accesses the given location and processes the content accordingly.

A profile comprises a base URL and other credentials that are required to access a specific application. These details point to the actual location where the required Markdown file(s) are available. The contents are then accessed and displayed through the macro.

If an absolute URL is entered here, the macro reads content from the specified URL. If a profile is also specified, the macro ignores the given profile and processes content through the given URL.

url
URL user
Enter the user name for URL access that requires basic authentication.user
URL password
Enter the user password for URL access that requires basic authentication.password
URL connection timeout
Enter time in milliseconds such that URL connections do not timeout before getting data. Use this to increase the access time needed for slow connections. Note that if a zero is given the connection may wait infinitely.timeout
File encodingUTF-8

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

encoding

It is mandatory to specify either a profile or a URL for this macro.

How profiles and URLs are processed in the macro

Depending on the values provided for the Profile and URL to markdown file parameters, the following process applies:

Is Profile given?

(Y - Yes, N - No)

Is URL to markdown file given?

(Y - Yes, N - No)

Macro behavior
YNAccesses the URL specified in the profile through the pre-configured information.
NYAccesses the URL specified and renders the Markdown content as required.
YYAppends the URL mentioned in the URL to markdown file parameter to the URL configured in the profile. Thus, the macro creates a relative path to the Markdown file. If this path is not valid, a network error message is displayed. Contact your Confluence administrator to know how you can resolve the issue.

Common parameters

The following parameters are available for all the 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)

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 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
hardwrap
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.

tableClass

Screenshot

The following example uses an absolute URL in URL to markdown file of the macro settings:

Additional links

  • No labels