This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Known Confluence Macros

This article is a resource where you can find information about known Confluence macros.

How WikiTraccs handles Confluence macros

WikiTraccs contains transformation rules for a range of Confluence macros. They are transformed on the fly and ideally the macro is replaced by something native to the SharePoint world.

If there is no SharePoint way of replacing a Confluence macro then WikiTraccs tries to find an approximation. But often there is just no equivalent for a Confluence macro. In those cases a text placeholder will be used to mark the spot where the macro has been in Confluence.

Read more about how WikiTraccs transforms macros here: How Do Confluence Macros Look in SharePoint?.

List of Known Macros and How They Are Handled

The following table shows macros that are explicitly known to WikiTraccs and how they are handled.

MacroSupport LevelMacro Transformation Details
StatusπŸ’šThe macro will be transformed to text with a color that tries to match the original (not so many choices here in SharePoint…).
NoformatπŸ’šThe “no formatting” content formatting will be mirrored in the SharePoint page.
Code BlockπŸ’š/🟑Code macros are transformed to SharePoint code web parts which provide comparable functionality. But if the code macro in Confluence is part of a table or any other nested structure then there is no 1:1 representation in SharePoint. The web part in this case will be replaced by a placeholder and the web part inserted at a top level place in the SharePoint page.
SharePoint Online Document (by Communardo)🟑The macro will be replaced by a link to the SharePoint document.
SharePoint Online List (by Communardo)🟑The macro will be replaced by a link to the SharePoint site containing the list; the link text contains the SharePoint list ID.
Profile Picture🟑The profile picture will be transformed like user @-mentions in the page (see section below for details).
User Profile🟑The user profile card will be transformed like user @-mentions in the page (see section below for details).
Enhanced Profile (by Communardo)🟑The user profile card will be transformed like user @-mentions in the page (see section below for details).
Jira Issue Link🟑The Jira macro will be replaced by a link to the Jira issue.
Jira Issue List🟑The Jira issue list will be converted to a static table showing links to Jira issues. If the table had multiple pages, a snapshot of only the first page is migrated to SharePoint. So, for a query that covers 1000 issues only the first 20 or so will be shown. A link to Jira is added to the SharePoint page so you can jump to Jira to see the live issue list.

Note that in Confluence Cloud this does only work with Interactive authentication; see Confluence Cloud Specialties for details.
Spreadsheet (by Elements)🟑The spreadsheet macro will be replaced by a link to the file attachment.
View File🟑The file card will be replaced by a link to the file attachment of the SharePoint page.
Office Powerpoint🟑The file card will be replaced by a link to the file attachment of the SharePoint page.
Office Word🟑The file card will be replaced by a link to the file attachment of the SharePoint page.
Office Excel🟑The file card will be replaced by a link to the file attachment of the SharePoint page.
Microsoft Stream Video🟑The file card will be replaced by a link to the video.
Panel, Info, Note, Warning, Tip🟑The macro will be replaced by a table rebuiding the macros’s structure as far as possible; this can introduce nested tables which will be a challenge for page layout (see section below for details on nested tables).
Expand🟑The expand functionality will be lost and the content remains expanded in the SharePoint page.
Gliffy🟑The Gliffy diagram will be replaced by an image of the diagram (that should be present in Confluence as page attachment); if there is no image a placeholder text will be used instead.
draw.io, draw.io board/sketch (by //Seibert/Media)🟑The draw.io diagram will be replaced by an image of the diagram (that should be present in Confluence as page attachment); if there is no image a placeholder text will be used instead.
Roadmap🟑Will be exported as image.
Widget Connector🟑The macro will be replaced by a link to the content it links to (for example a YouTube video), if there is such a link.
HTML🟑The HTML content from the macro will be transformed to a code web part in SharePoint; so the HTML is transformed to code and especially JavaScript will not be executed in the SharePoint page.
Tabs Container, Tabs Page (by Adaptavist)🟑This macro displays multiple tabs which is a challenge because SharePoint has no tabs. So the tabs are each one transformed to “normal” page content and all tabs are added one after another to the page.
Attachments🟑Note that the actual attachments of Confluence pages are always migrated to SharePoint. The Page Attachments macro is migrated as a static view of the macro at the time of migration. So the SharePoint page will show a static table with attachment links and some metadata.
Brikit Theme Press🟑The Brikit Theme Press is recognized by WikiTraccs. Brikit Theme Press layers will be converted to modern SharePoint page sections. Each SharePoint page section will have a number of columns that corresponds to the number of columns in the Brikit Theme Press layer. SharePoint can only have a maximum of three columns in a section, so WikiTraccs will create additional sections if there are more columns in the Brikit Theme Press layer. The content from Brikit Theme Press blocks will be added to the corresponding SharePoint section columns. Note: available as of WikiTraccs v1.16.0.
Page Tree🟑The Page Tree macro is migrated as a static view of the macro at the time of migration. The SharePoint page will show a static tree of page links.
Table of Contents🟑Migrated as a static view of the macro at the time of migration. The SharePoint page will show a static tree of page links.
Children Display🟑Migrated as a static view of the macro at the time of migration. The SharePoint page will show a static tree of page links.
Include Content Suite (by Keysight Technologies): Shared Block, Include Shared Block🟑The shared block macro content is migrated as is, without surrounding text placeholders. The include shared block macro is migrated as copy of the referenced “shared block” macro, instead of just a text placeholder. Page links and image references are adjusted. Note: available as of WikiTraccs v1.23.16.
PlantUml Suite (by avono AG): PlantUml, FlowChart, SpaceGraph, LinkGraph, Database Structure🟑Those macros are migrated as image. Note: available as of WikiTraccs v1.24.18.
PlantUml Database Info🟑Migrated as snapshot of the database info output that is shown on the Confluence page. Note: available as of WikiTraccs v1.24.18.
Content by Label🟑Migrated as static snapshot. Note: available as of WikiTraccs v1.25.4.
Content Report Table🟑Migrated as static snapshot. Note: available as of WikiTraccs v1.25.4.
MultiExcerpt (by Appfire)⏹
Table Filter (by StiltSoft)⏹️Filter functionality is lost, the table remains.
Excerpt⏹️
Single Cite (by Purde Software)⏹️The macro will be replaced by the citation content.
Table Chart⏹️The chart will be replaced by a table of the underlying data.
No Print⏹️The no-print functionality will be lost, the content remains.
Linchpin macrosπŸ”»/⏹There is no special handling built in for Linchpin macros, but they seem to transform fine to either text placeholders or macro body.
LivesearchπŸ”»
AnchorπŸ”»The anchor link will be removed, its text or content remains.
Excerpt IncludeπŸ”»
Metadata News (by Communardo)πŸ”»
Metadata (by Communardo)πŸ”»
Recently UpdatedπŸ”»
Profile List (by Communardo)πŸ”»
Include PageπŸ”»
Team CalendarπŸ”»
Jira ChartπŸ”»
Task ReportπŸ”»
Create from TemplateπŸ”»
Page Properties ReportπŸ”»
Page Tree SearchπŸ”»
Search ResultsπŸ”»
Create PageπŸ”»
Cite Summary (by Purde Software)πŸ”»
Blog PostsπŸ”»
Display Metadata (by Communardo)πŸ”»
Metadata Overview (by Communardo)πŸ”»
Metadata History (by Communardo)πŸ”»
Content by Metadata (by Communardo)πŸ”»
Other macros not explicitly mentionedπŸ”»/⏹️The macro will be replaced, either by a text placeholder or its body content.

Transformation types:

  • πŸ’š “nearly 1:1” - there is a SharePoint or HTML equivalent allowing to rebuild the functionality in SharePoint
  • 🟑 “changes in layout or functionality” - transformation with changes to layout or functionality; this is a transformation that is more than just a generic placeholder, but it does not fully meet the original macro functionality
  • ⏹️ “to macro body” - this works for macros that contain “richt text content” which is just normal wiki page content; this transformation type will replace the macro by its rich text content, thus kind of “unboxing” it
  • πŸ”» “to placeholder” - transforms to a non-functional placeholder text, showing the macro’s parameters

All macros not explicitly mentioned here are transformed to placeholders, so are either ⏹️ or πŸ”». When macros contain rich content then the macro is replaced by its rich content.

Confluence Cloud ADF Extensions

In Confluence Cloud Atlassian introduced extensions which (currently) cannot be exported, like the Chart extension:

Those elements will be replace by a text placeholder, until there is a proper programmatic way to export them.

Currently the only way to export those seems to print the web page to PDF, or to export a page as PDF. Even the Word export doesn’t contain those extensions.

1 - How Do Confluence Macros Look in SharePoint?

This article describes the ways in which WikiTraccs transforms Confluence macros to SharePoint content.

The equivalent of Confluence macros in SharePoint are SharePoint web parts.

Confluence has a rich ecosystem of apps and macros. Microsoft is not there, yet, when it comes to providing a marketplace that brings the same to SharePoint Online.

We briefly examine what macros and web parts are, and then discuss the challenges and strategies for migrating macros to SharePoint.

What Is a Confluence Macro?

A Confluence macro is a piece of functionality that you can add to a Confluence wiki page.

Here’s the Info macro in edit and view mode:

The info macro’s job is to display text that is highlighted with a frame and potentially an icon.

Confluence administrators can install apps from the Atlassian Marketplace to add new macros to Confluence.

What Is a SharePoint Web Part?

A SharePoint web part is a piece of functionality that you can add to a SharePoint page.

Here’s the Text web part in edit and view mode:

SharePoint administrators can install apps from Microsoft AppSource to add new web parts to Confluence.

Migrating Macros to SharePoint Online Is Often Impossible

In most cases, it’s not possible to migrate Confluence macros to SharePoint.

Lack of Available Products

There often is no product available that can serve as a 1:1 replacement for the Confluence macro, either as an out-of-the-box solution or a as a commercial product.

Technical Differences

There are differences between macros and web parts that can make a 1:1 translation technically impossible, even if there was a vendor that tried to provide a 1:1 replacement. This will be covered in another article.

Effort Too High

If there were a product available that could bring a Confluence macro’s functionality to SharePoint, there would be several things that would need to be done:

  1. Find the product
  2. Evaluate if the product is a good replacement that covers the use cases
  3. Purchase the product, or in the case of community solutions
  4. Make the decision to help maintaining the community solution (one popular solution example is PnP Search)
  5. Make WikiTraccs transform the macro to the product’s web part

Each of these steps might require a lot of work.

How to Migrate Confluence Macros to SharePoint Online?

Now that we have looked into the difficulties of migrating Confluence macros to SharePoint, let’s talk about solutions.

WikiTraccs uses the following approaches when bringing a Confluence macro to a SharePoint page:

  1. One-to-one Transformation
  2. Static Snapshot Transformation
  3. Generic Macro Body Transformation
  4. Text Placeholder

The following sections look into each of those approaches.

One-To-One Transformation

Some SharePoint web parts can replace the Confluence macro nearly one-to-one.

An example is the Code Block macro which will be transformed to a Code Snippet web part.

The expectation for a 1:1 transformation would be, that the SharePoint web part does things the same way as the Confluence macro.

There are not many of those transformations.

Static Snapshot Transformation

When WikiTraccs cannot find a 1:1 replacement for a Confluence macro in SharePoint, it might resort to taking a snapshot of the source macro.

Snapshot means, that it will migrate the current view of a macro to SharePoint, where the view will end up either as static page content or as a static image.

The Children Display Macro as an Example of Text Snapshots

One example is the Children Display macro. In the following sample, this macro shows the child pages for the current page, two levels deep:

Macro Edit View in Confluence

When migrating this to SharePoint, WikiTraccs takes a static snapshot of this view, and puts that into the migrated SharePoint page:

Snapshot View in SharePoint

Those links will work and point to the correct SharePoint pages. But the list won’t change when you add or remove pages, as it’s just a list of links in a SharePoint Text web part:

Text Web Part Edit Mode in SharePoint

In Confluence, when adding child pages to the current page, those pages will be shown by the Children Display macro. On the migrated page in SharePoint, the list is static.

The Draw.io Macro as an Example of Image Snapshots

Another popular example is the draw.io macro.

When migrating a draw.io macro to SharePoint, WikiTraccs uses the macro’s preview image and inserts that to the SharePoint page.

So, in SharePoint you’ve got a static image. The raw draw.io file is still around in SharePoint as page attachment, but still, you would have to take the file outside SharePoint to make changes to the diagram.

Generic Macro Body Transformation

WikiTraccs applies the Generic Macro Body transformation to macros that it doesn’t know (yet) or where there is no explicit transformation built-in.

Many Confluence macros act as frame for content. Let’s revisit the Info macro:

The body of the Info macro is the Lorem Ipsum text. When viewing the Confluence page, the Info macro applies formatting to its body - it draws a frame and shows an icon:

Another example is the Aura Background Content macro. This macro can be used to change the background of content, for example add a background color:

At the time of this writing, there was no explicit transformation built in to WikiTraccs for the Aura Background Content macro. So, WikiTraccs uses the default transformation for such macros: it migrates the macro body and surrounds it with text markers, indicating that there was a macro:

You’ll get used to that look after migrating a few pages.

A drawback of this approach is that it often loses styling and formatting. The benefit is that it preserves the actual content.

Text Placeholder

If WikiTraccs encounters a Confluence macro that has no body and thus no content that could be migrated, it replaces the macro with a text note.

Take the Stiltsoft Handy Button as example:

At the time of this writing there was not explicit transformation for this macro built into WikiTraccs. WikiTraccs transforms the macro to a text placeholder:

Here, the parameter output also shows the button caption and the link it points to. This would be a good candidate for being converted to a plain link by WikiTraccs.

Can WikiTraccs Transform a Macro Differently?

WikiTraccs continuously adds new macro transformations. Each transformation has to be hand-crafted. This is mostly driven by customer demand, so I’d like to hear about your high-priority macros.

When adding macro transformations to WikiTraccs, it is often not immediately clear how the result should look on a modern SharePoint page; or there are multiple ways of doing it.

Help me help you by suggesting a transformation and providing me with additional information. The most important part for me is that the desired result could be built manually by a user, in the browser, on a modern SharePoint page. For when a user can build it, WikiTraccs can do as well.

Please refer to the following blog post for more information on how features are added to WikiTraccs and which information helps getting it done: Can Feature ‘XYZ’ Be Added to WikiTraccs?

2 - Macro Placeholders and Transformation Templates

This article describes how macro placeholders work and how you can modify them with transformation templates.

Note: Macro transformation templates are available as of WikiTraccs v1.20.6.

Note: Macro transformation templates got more powerful with release v1.26.1. Make sure to use a current version.

What are Macro Placeholders?

Macro placeholders are text replacements for macros and look like this:

πŸš§πŸ‘‡ Replaced ‘xyz’ macro, its content follows below (atlassian-macro-output-type==‘INLINE’)

🚧☝️ End of content of replaced ‘xyz’ macro

When migrating wiki pages from Confluence to SharePoint, WikiTraccs has to transform macros to something that SharePoint understands.

If there is no equivalent to a macro in SharePoint (which is the regular case), WikiTraccs often applies a generic transformation that replaces the macro in SharePoint with a text note.

Macro Placeholder Example

Let’s take the div macro as example. It is part of Adaptavist’s Content Formatting Macros offering.

How does the div macro look before and after having been migrated to SharePoint?

The div macro allows to apply formatting to Confluence page content, like setting the text color.

The following configuration applies a blue text color to the macro content when the macro is shown on the Confluence page:

Macro in edit mode, applying the 'color:blue' CSS style to its content, plus some other things.

Macro in view mode, displaying blue text in the Confluence page.

When migrating this macro to SharePoint, WikiTraccs discards the macro container, pulls its content out, and puts that on the page. A text placeholder highlights that this happened:

So, the result of this transformation is:

  • all content of the div macro has been migrated
  • formatting is gone with the macro container
  • a text placeholder highlights that a former div macro has been removed, but the content retained

Now, sometimes you want to get rid of that 🚧 placeholder text. You can create a custom placeholder to do that.

How to Create a Custom Macro Placeholder?

WikiTraccs allows to replace many of its built-in macro transformations using transformation templates. This can be used to replace generic macro placeholders with something different.

You can use Handlebars templates to describe how the placeholder for a macro should look. Handlebars is a markup language and templating system commonly used in web development.

Let’s say we want to remove the placeholder text for the transformed div macro, just migrating its body content.

The Handlebars template to do that looks like this:

{{!-- Don't add placeholder text, just render body --}}
{{Body}}

Some facts about above template:

  • {{Body}} is a variable, referencing the macro body; this tells WikiTraccs to just render the macro body, without additional placeholder text
  • {{!-- --}} marks a comment in the template; this is ignored by WikiTraccs

Using above transformation template, the transformed macro looks like this in SharePoint:

The 🚧 note is now gone.

Where to Put the Transformation Template File?

Custom transformation templates are stored as files in a folder.

When using WikiTraccs.GUI (the blue window), find WikiTraccs.GUI.exe and starting there, find the Templates\Transformation folder. Save your template file there.

When solely using WikiTraccs.Console (this most likely is not the case), find WikiTraccs.Console.exe and starting there, find the Templates\Transformation folder. Save your template file there.

The Transformation folder alreads contains files and should look like this (note that this can change in future WikiTraccs releases):

Each of those .hbs files contains a transformation template.

The transformation templates can apply to either

  • a single macro type (like div, or rw-ui-tabs-macro), OR
  • multiple macro types (like english,belarusian,bulgarian,canadian-en,…)

Transforming a Single Macro Type

When you want to transform a single macro type (like div), you save the transformation template in a file that carries the internal macro name in its filename and has the .hbs extension.

The file containing the transformation template for the div macro would thus be named div.hbs.

To reiterate, the steps to create a transformation template for a single macro type are:

  1. identify the internal macro name
    • you can see macro names in the storage format XML
    • note: for our div macro we see ac:name="div" in the storage format XML
  2. create a Handlebars template that describes how the custom placeholder should look
  3. save the Handlebars template in a file, in the Templates\Transformation folder
    • the filename follows the pattern MACRONAME.hbs where MACRONAME is the name of the macro
    • the file extension must be .hbs for WikiTraccs to recognize the file

Transforming Multiple Macro Types With a Single File

You can also put a special comment as first line into your .hbs file to apply the template to multiple macros, saving you the hassle to create identical files for each of those types.

Here is an example:

{{!-- applyto:english-us,english,belarusian,bulgarian,canadian-en,canadian-fr,catalan,chinese,croatian,czech,danish,dutch,estonian,finnish,french,german,greek,hindi,hungarian,icelandic,indonesian,irish,italian,japanese,korean,latvian,lithuanian,malay,maltese,norwegian-nb,norwegian,polish,portuguese,portuguese-br,romanian,russian,serbian,slovak,slovenian,spanish,swedish,thai,turkish,ukrainian,vietnamese --}}

This tells WikiTraccs to use the template for all the macros listed after the applyto: marker (internal macro names, separated by comma).

The filename doesn’t matter, as long as it has the .hbs ending.

Which Variables Are Available in Templates?

The following variables are available in transformation templates:

VariableData TypeMeaning
Bodyn/athe macro body (if the macro has one)
HasBodybooleantrue, if the macro has a body
HasNoBodybooleantrue, if the macro has no body
Details.InternalNametextinternal macro name (for example “bgcolor”)
Details.DisplayNametextmacro display name (for example “Background Color”)
TypeAsStringtext‘macro’ for macros, ‘ADF extension’ for ADF extensions, ‘unknown embedding’ otherwise
IsMacrobooleantrue, if the macro is a macro
IsMacroEmptybooleantrue, if the macro is empty; a macro that only consists of whitespace and line breaks is considered empty as well; note that body-less macros may be considered not empty, if they are known to convert to content (like a date macro which seems empty, as it has no body content, but transforms to the current date and is therefore not empty)
IsAdfExtensionbooleantrue, if the ‘macro’ is an ADF extension (so, not really a macro, but covered by macro transformation nevertheless)
HasParametersbooleantrue, if the macro has parameters
HasNoParametersbooleantrue, if the macro has no parameters
ParameterCountnumberthe number of macro parameters
Parameterscollectionmacro parameters, if the macro has any; each parameter has a Name and Value property; there is also a Links property that is populated with links parsed from the parameters
MacroXmltextcontains the raw macro XML as defined in the page’s storage format; note that you most likely need the triple brace syntax (like {{{MacroXml}}}) to work with that variable to prevent escaping
@CanTransformToTableboolean | nullinternal indicator of WikiTraccs if the macro can be transformed to a table; sometimes set to false to prevent nested table structures, sometimes set to true if nesting is unlikely; might be null
DefaultPlaceholdern/agenerates the generic macro placeholder that is output by WikiTraccs if it doesn’t know a macro; this will output a placeholder text, macro parameter values, and the body (if there is any)
RandomGuid1texta randomly generated GUID value; the variable has the same value during one macro transformation, even if used in multiple places of the template file; this can be useful if you need a random GUID at multiple places in the same template; there is also RandomGuid2 and RandomGuid3 available, providing up to 3 random GUIDs
Parameterobjectspecial variable granting access to macro parameters; see section Accessing Macro Parameters below

The following commands are available as well:

CommandMeaning
{{Exit}}Cancels processing of the current transformation template; can be used to fall back to the built-in transformation logic of WikiTraccs
{{RemoveMacro}}Removes the current macro without replacement

There are also helper functions available like String.Equal (which can be used to compare two text values for equality). Those are sometimes used by WikiTraccs’ own templates and are documented via their usage in those templates.

WikiTraccs brings some transformation template files along. In the Templates/Transformation folder, have a look at the unknown.hbs.sample file for an advanced usage example, or any of the other files.

Working with Macro Parameters

Macro parameters can be accessed via the Parameter variable.

For example the value of the macro parameter title is available via Parameter.title.Value. The parameter name (here title) is always written lowercase, even if the original macro parameter is not.

To get the value of a macro parameter (as text), you use the Parameter.paramname.Value syntax.

To get the raw XML representation of a macro parameter (as text), you use the Parameter.paramname.Xml syntax.

If the macro parameter contains links, those are accessible via the Parameter.paramname.Links collection. Each of the links can have a Title and Href property. The unknown.hbs.sample sample transformation template file shows how to enumerate links.

Sometimes WikiTraccs injects additional macro parameters mainly for internal use in its own transformation templates:

  • Parameter.wikitraccs-targetreference - added (for example) to Excerpt Include and Multiexcerpt include macros; this parameter contains an ac:link element, pointing to the page the snippet is included from; it’s used to generate a link to the source page

Multi-Pass Transformation

Macro transformation is done in three phases for each macro:

  • prebuiltin
  • builtin
  • postbuiltin

Prebuiltin can be used to decorate a macro before the built-in transformation logic kicks in.

Builtin executes the built-in transformation logic for a macro. Macro transformation templates can replace this logic.

Postbuiltin is used internally by WikiTraccs where a macro is not yet fully transformed in the builtin stage, but will be in postbuiltin.

Macro transformation templates by default are applied in the builtin stage (and replace the builtin transformation logic), unless marked otherwise.

A transformation template can be marked for a specific stage like this:

  • expand[prebuiltin].hbs - executed in prebuiltin stage
  • excerpt-include[postbuiltin].hbs - executed in postbuiltin stage
  • excerpt.hbs - no marker, builtin stage by default

Templates for SharePoint Web Parts

Have a look at the Convert Macros to SharePoint Web Parts to learn about web part generation.

Templates that generate web parts have a specific structure and the <div data-wikitraccs-webpart-template="true"> element plays a key role. It acts as marker for WikiTraccs to trigger web part generation.

Important Notes About Macro Transformation Templates

Troubleshooting

If your template is not recognized check for the following issues:

  • the template file is in the wrong folder
  • the template file doesn’t have the .hbs file ending
  • the filename doesn’t have the right pattern
  • the macro is already handled by a built-in transformation rule and thus no generic placeholder is being generated (note: there is nothing you can do about that; please get in touch and give feedback)
  • the template is malformed

Check the console log output or common log files to see if WikiTraccs loads your template.

This is how the log looks if a template could be successfully loaded:

Found 3 transformation template files in folder '<path>/Templates/Transformation', will handle one by one: ch.bitvoodoo.confluence.plugins.language.hbs div.hbs rw-ui-tabs-macro.hbs
Trying to load transformation template from file 'Templates/Transformation/div.hbs'
Compiling and registering transformation template for 'div'

Any issues should be visible here as well. You can also look at the logs to learn about the path WikiTraccs loads templates from, if you are unsure where to put them.

2.1 - Macro Transformation Template Samples

This article shows sample templates.

Note: Macro transformation templates got more powerful with release v1.26.1. Make sure to use a current version.

Simple Body Replacement

Remove Macros without Body

The following template replaces the macro by its body content, for a list of macros. If the macro has no body, it will be removed.

{{!-- applyto:style,auibuttongroup,auibutton,div,bgcolor,alert,align,bibtex-reference,bibtex-display,center,clickable,auidialog,span,fancy-bullets,footnote,display-footnotes,highlight,auihorizontalnav,htmlcomment,img,table,tr,th,td,thead,tbody,iframe,latex-formatting,ol,li,ul,lozenge,auimessage,p,pre,privacy-policy,privacy-mark,auiprogress,auiprogressstepstatic,roundrect,search-box,span,tooltip,strike,copyright,reg-tm,sm,tm, --}}
{{#if HasBody}}
    {{Body}}
{{else}}
    {{RemoveMacro}}
{{/if}}

This preserves the macro body, even if it only consists of whitespace or line breaks.

Remove Macros without Body, or with Empty Body

If you want to remove such empty macro bodies as well, use the following approach, which also removes macros with empty body:

{{!-- applyto:style,auibuttongroup,auibutton,div,bgcolor,alert,align,bibtex-reference,bibtex-display,center,clickable,auidialog,span,fancy-bullets,footnote,display-footnotes,highlight,auihorizontalnav,htmlcomment,img,table,tr,th,td,thead,tbody,iframe,latex-formatting,ol,li,ul,lozenge,auimessage,p,pre,privacy-policy,privacy-mark,auiprogress,auiprogressstepstatic,roundrect,search-box,span,tooltip,strike,copyright,reg-tm,sm,tm, --}}
{{#if HasBody}}
    {{#unless IsMacroEmpty}}
        {{Body}}
    {{else}}
        {{RemoveMacro}}
    {{/unless}}
{{else}}
    {{RemoveMacro}}
{{/if}}

3 - Convert Macros to SharePoint Web Parts

This article describes how to convert Confluence macros to SharePoint web parts.

Note: Converting macros to web parts is available as of WikiTraccs v1.26.1.

Refer to below videos to learn how to configure WikiTraccs to create either Children Display, or Jira web parts.

Convert Children Display Macros to Children Display Web Parts

The WikiPakk app makes Children Display web parts available in SharePoint (note: starting with release 2.9.0). Adding this app to the site is required for the Children Display web part to be available.

Convert Jira Macros to Jira Web Parts

The SharePoint Connector for Jira app makes Jira web parts available in SharePoint. Adding this app to the site is required for the Jira web part to be available.

Note: this only works for Jira issue lists. Single Jira issues, or other Jira macros (charts, …) are not supported by the SharePoint Connector for Jira app (at the time of writing this).

Convert Other Macros to Web Parts

Converting to other web parts might already be possible, although it hasn’t been tested, yet. Have a look at above videos and the macro transformation templates files they mention to get an overview of how the whole process works. It is meant to be adaptable to other web parts as well.