Importing Confluence Macros
This topic describes how ClickHelp handles Confluence macros during the import process.
Supported Macros
All supported Confluence macros will be automatically converted to the corresponding ClickHelp elements or processed, keeping their content. Here's the list of supported macros:
Confluence macro
|
ClickHelp element
|
Comment
|
---|---|---|
Anchor
|
Anchor
|
|
Children Display
|
See Also
|
|
Code Block
|
Code Sample
|
|
Column | — | Supported only for Confluence Cloud. |
Conditional Content
|
Conditional Content |
Part of the Scroll Versions functionality. Conditional pages with Variants are imported as topics with Output Tags created from Variants applied to them.
|
Decision
|
Quick Parts
|
Inserted as Info Box template with the different background color.
|
Error
|
Quick Parts
|
Inserted as Error Box template.
|
Excerpt and Excerpt Include
|
Content Snippets
|
Learn the specifics of the Excerpts import below.
|
Expand
|
Dropdown Text
|
|
Hide If/Show If
|
Conditional Content
|
Inserted as Including/Excluding blocks converting User Groups into Output Tags. |
Horizontal Rule
|
Horizontal Line |
|
iFrame | Videos and other iframe content | |
Include Page | Content Snippets | The Page is imported as two topics: the Include page's content is imported as a separate topic that is placed under the Snippets folder, and the rest of the content is imported as the "main" topic. |
Info
|
Quick Parts
|
Inserted as Info Box template.
|
Live search | — | Allows searching in the entire portal or in a specific project. |
Multi Excerpt | Content Snippets | Learn the specifics of the MultiExcerpts import below. |
Note
|
Quick Parts
|
Inserted as Info Box template.
|
Numbered Headings | — | Only the numeric format is supported. |
Page Properties | — | Inserted as a <div> HTML element. If the content has the hidden property in the macros, it will be imported with the style display:none. |
Panel
|
— |
Imported as a <p> HTML element preserving its styles like font-weight, border styles, background color, etc.
|
Section | — | Supported only for Confluence Cloud. |
Success
|
Quick Parts
|
Inserted as Success Box template.
|
Tip
|
Quick Parts
|
Inserted as Info Box template.
|
Table of Contents
|
Mini-TOC
|
Inline styles such as list-style-type, indent, etc., are not preserved. |
Table of Content Zone | Mini-TOC | |
Warning
|
Quick Parts
|
Inserted as Warning Box template.
|
Widget Connector | Videos and other iframe content | Inserts content from other sites and services. |
Unsupported Macros
There is an Unsupported macros processing setting in Step 3 of the Confluence import wizard, which allows you to choose how to handle unsupported macros: Remove unsupported macros or Replace unsupported macros with placeholders.
Here is how both options work.
Remove unsupported macros
Unsupported macros will be processed in the following way:
- If a macro doesn't have any content, it will be removed.
- If a macro has content, only the content will be imported. The container of the macro will be removed.
The Remove unsupported macros option is the recommended way of handling the unsupported macros. |
Replace unsupported macros with placeholders
Choosing this option will keep the unsupported macros and wrap their content in the <div> or <span> containers. The <div> tag is used for the macro with content, <span> — for the one without.
Here's an HTML example of what an unsupported macro without content looks like after the import if the Replace... option is chosen:
HTML |
<span unknown-macro-name="status" unknown-macro-attribute="{"colour":"Green","title":"Test"}"> |
- The unknown-macro-name attribute contains the name of the macro.
- The unknown-macro-attribute attribute contains the macro's settings that were used in Confluence.
The markup for the macro with content is similar, except for the <div> tag being used instead and the macro's content being wrapped in it.
After the import, you can always use the Global Find and Replace feature to perform the cleanup of the imported unsupported macros.
The Excerpt and MultiExcerpts Macros Import Specifics
The Excerpt macros are imported to ClickHelp as Content Snippets. However, there are two different scenarios of Excerpt handling:
- The excerpt makes up all Page content. The Page is imported as a single topic and placed under the Snippets folder.
-
The excerpt makes up a part of the Page content. The Page is imported as two topics: the Excerpt's content is imported as a separate topic that is placed under the Snippets folder, and the rest of the content is imported as the "main" topic; the topic made from the Excerpt is then inserted into the "main" topic as a snippet.