<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kanta Kosaka</title>
    <description>The latest articles on DEV Community by Kanta Kosaka (@sijimok).</description>
    <link>https://dev.to/sijimok</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4278104%2F5df75242-07f9-460e-a953-c29945772966.png</url>
      <title>DEV Community: Kanta Kosaka</title>
      <link>https://dev.to/sijimok</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sijimok"/>
    <language>en</language>
    <item>
      <title>Moving Markdown macros off a Connect app in Confluence Cloud (and keeping your Mermaid diagrams)</title>
      <dc:creator>Kanta Kosaka</dc:creator>
      <pubDate>Wed, 02 Dec 2026 09:35:12 +0000</pubDate>
      <link>https://dev.to/sijimok/moving-markdown-macros-off-a-connect-app-in-confluence-cloud-and-keeping-your-mermaid-diagrams-188h</link>
      <guid>https://dev.to/sijimok/moving-markdown-macros-off-a-connect-app-in-confluence-cloud-and-keeping-your-mermaid-diagrams-188h</guid>
      <description>&lt;p&gt;If your team writes Markdown in Confluence Cloud, there is a good chance some of those pages use &lt;strong&gt;Render Markdown&lt;/strong&gt;, a free Connect app that has been around since 2014. It still has thousands of installs, but its last release was in October 2021, and it is a Connect app. Atlassian is moving the ecosystem to Forge, and Connect apps that have not moved can no longer ship updates.&lt;/p&gt;

&lt;p&gt;Nothing breaks today. But if you have a few hundred pages that depend on one macro from an app that will not be updated again, it is worth knowing what moving off it actually involves.&lt;/p&gt;

&lt;p&gt;I built a Forge app that includes a migration for this case, so here is what I learned about the problem, whether you use my app or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a Render Markdown macro looks like inside a page
&lt;/h2&gt;

&lt;p&gt;Confluence Cloud stores pages as ADF (Atlassian Document Format), a JSON tree. A Render Markdown macro is an &lt;code&gt;extension&lt;/code&gt; node, and the Markdown you typed sits in one parameter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"extension"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"attrs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"extensionType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"com.atlassian.confluence.macro.core"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"extensionKey"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"markdown"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"parameters"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"macroParams"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"__bodyContent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"# Release notes\n\n| Item | Status |\n|---|---|\n| API | done |"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things follow from this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Markdown is plain text in the page.&lt;/strong&gt; Nothing is lost if the app goes away; you just stop seeing it rendered.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confluence search does not index that text.&lt;/strong&gt; In my tests, words that only appeared inside the macro body were not found by search. After converting the macro to a Forge macro, the same words were found.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Your options
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Paste it as native content.&lt;/strong&gt; Confluence's editor converts pasted Markdown into normal page content. That is the right answer for pages that will be edited in the editor from now on. You lose the Markdown source, and Mermaid blocks become plain code blocks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep it as Markdown in a Forge macro.&lt;/strong&gt; Better for pages where people want to keep writing Markdown, or where the Markdown is copied from a README or a docs repo.&lt;/p&gt;

&lt;p&gt;Either way, doing it by hand means opening every page, finding every macro, and copying the body across. For a site with hundreds of pages that is an afternoon or more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Doing it in one run
&lt;/h2&gt;

&lt;p&gt;Since the Markdown is just a parameter on an &lt;code&gt;extension&lt;/code&gt; node, the conversion can be automated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Search the site for pages that contain the macro (CQL &lt;code&gt;macro = markdown&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;For each page, read the ADF, find the &lt;code&gt;extension&lt;/code&gt; nodes whose key is &lt;code&gt;markdown&lt;/code&gt;, and confirm they belong to Render Markdown. Other apps also use a macro called &lt;code&gt;markdown&lt;/code&gt;, so anything that cannot be confirmed is left alone.&lt;/li&gt;
&lt;li&gt;Replace each node with the new macro, &lt;strong&gt;copying the Markdown body character for character&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Save the page as a &lt;strong&gt;new version&lt;/strong&gt;, so the previous one can be restored from page history.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftkm5soc9bsoy53xs3ep0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftkm5soc9bsoy53xs3ep0.png" alt="The Markdown migration admin page: Scan site lists pages with a markdown macro. Unconfirmed macros are left unselected." width="799" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my own measurement this took about 0.27 seconds per page (240 pages), so a site with 500 affected pages finishes in a few minutes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjeif07iqmzt8ccuwcogt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjeif07iqmzt8ccuwcogt.png" alt="After Convert selected: 3 pages converted, 0 failed. Unconfirmed pages are untouched." width="799" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Mermaid inside the Markdown
&lt;/h2&gt;

&lt;p&gt;The other thing I wanted was diagrams. A fenced &lt;code&gt;mermaid&lt;/code&gt; block inside the Markdown becomes a rendered diagram:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Deploy flow
&lt;/span&gt;
&lt;span class="k"&gt;```mermaid
&lt;/span&gt;flowchart LR
  PR[Pull request] --&amp;gt; CI{Tests pass?}
  CI -- yes --&amp;gt; Staging --&amp;gt; Prod
  CI -- no --&amp;gt; PR
&lt;span class="k"&gt;```
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because the diagram is text, changing the flow is a one-line edit, and the diff is readable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The app
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.atlassian.com/apps/1243250123/markdown-mermaid-for-confluence?hosting=cloud&amp;amp;tab=overview" rel="noopener noreferrer"&gt;Markdown &amp;amp; Mermaid for Confluence&lt;/a&gt;&lt;/strong&gt; is what I built:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Markdown macro, block and inline: tables, footnotes, definition lists, highlighted code&lt;/li&gt;
&lt;li&gt;Mermaid diagrams inside the Markdown, with full-screen zoom and SVG / PNG export&lt;/li&gt;
&lt;li&gt;Dark mode, Confluence search indexing, and PDF export that keeps the diagrams&lt;/li&gt;
&lt;li&gt;An admin page, "Markdown migration", that scans the site for Render Markdown macros and converts the ones you select, each as a new page version&lt;/li&gt;
&lt;li&gt;Runs on Atlassian (Forge): content never leaves Atlassian's cloud, no external requests&lt;/li&gt;
&lt;li&gt;Free for up to 10 users&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Render Markdown is a product of StreamlineSoft. My app is not affiliated with or endorsed by StreamlineSoft.&lt;/p&gt;

&lt;p&gt;If you have a site full of Render Markdown macros, I would like to hear how many pages you are dealing with and what else gets in the way of moving them.&lt;/p&gt;

</description>
      <category>confluence</category>
      <category>atlassian</category>
      <category>markdown</category>
      <category>mermaid</category>
    </item>
  </channel>
</rss>
