Skip to main content
Skip table of contents

Creating a Link on a Page to Export the Content

You can create a user-macro that can be included anywhere on the Confluence page. Readers of your documentation can later click on the link to export the content with the export scheme defined in the user macro.

Before you begin: Before creating the link you have to create an export scheme and have to copy the REST URL.

To create a link on a page to export the content:

  1. Click the cog icon at top right of the screen and select Confluence Admin.
    The Administration Console is displayed.
  2. In the Configuration section, click User Macros.
    The screen User Macros is displayed.
  3. Click Create a User Macro.
  4. Enter 'export-link' in the field Macro Name.
  5. Activate the option Visible to all users in the Macro Browser.
  6. Enter 'Export Link' in the field Macro Title.
  7. Enter 'Creates an export-link' in the field Description.
  8. Select Formatting in the Categories drop-down.
  9. Leave the field Icon URL empty.
  10. Enter the url of this page in the field Documentation URL.
  11. Activate the option No macro body.
  12. Replace the text in the field Template with the following code:

    ## @param ExportSchemeId:title=Export Scheme Id|type=string|required=true
    <a class="scroll-html-launcher" data-export-scheme-id="$paramExportSchemeId" href="#">Export to HTML</a>
  13. Click Save.

The macro is created and can now be used in a page.

To use the macro on a page:

  1. Open the wanted page and click Edit.
  2. Enter '{export link'  and press Enter.
    The screen Insert 'Export Link' Macro is displayed.
  3. In the field Export Scheme Id enter the export scheme Id from your copied REST URL, for example: SUP-7F00010101402A5F3374B26C22502A2F
    (info) The export scheme Id is displayed in the REST URL between the '=' and the '&'
  4. Click Insert and save the page.

The macro is inserted to the page and can be used by readers to export the content with the defined export scheme.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.