Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,332
Community Members
 
Community Events
184
Community Groups

Import markdown into Confluence

According to the Confluence documentation on http://Importing Content Into Confluence, there is no supported way of importing markdown. Is this the case?

3rd party solutions seem not to work with current, self-hosted versions.

21 answers

1 accepted

Sharon Tan
Community Manager
Community Managers are Atlassian Team members who specifically run and moderate Atlassian communities. Feel free to say hello!
Apr 22, 2021 • edited

Hi there, appreciate everyone's input on this. I'm adding some clarification on what's possible OOTB today with Confluence.

Confluence Cloud:

Our Confluence Cloud editor (sites hosted on atlassian.net) supports markdown on the fly, so text with markdown formatting that is pasted directly into the editor will be converted. You can see more on supported markdown in Confluence's keyboard shortcuts.

We don't yet offer a plain text markdown editor so you can edit in markdown, but we're tracking interest on our feature request, Edit in Markdown with the new editor for Confluence Cloud.

Self-hosted:

With self-hosted Confluence, this can be done OOTB with the Markup macro (select Insert > Markdown from the drop-down).

You also have the option of adding a Marketplace app - Markdown Macro for Confluence is a free one, but you can browse apps specific to Confluence Server and Data Center in addition.

As for native support in self-hosted Confluence, we're collecting feedback at our feature requests for: 

Along with a bug that has since been resolved as of Confluence 6.14 and up:

You can see how feature requests are considered in our New Features Policy.

When i paste markdown into a new confluence page, it creates a code block and does no conversion

Screenshot from 2021-11-19 15-50-07.png

Like Stephanie Tuerk likes this

Or if i Ctrl+Shift+V, it pastes as plain text instead of a code block, but again no markdown conversion. This is on the cloud version

Screenshot from 2021-11-19 15-53-19.png

Like Stephanie Tuerk likes this

Same here. Extremely simple cases work but no where anything useful. 

It's also not correct when it comes to whitespace.

 

If I write a

paragraph like

this, adding whitespace

in the source document,

 

in markdown, all of the above gets treated and formatted as a single paragraph, eliding the whitespace in the same way that HTML does. If you paste into confluence, it doesn't do that. This is really frustrating.

Like Nichole Teh likes this

This doesn't really solve the problem. These shortcuts are handy but I have multiple pages in markdown that I would like to import. There appears to be no option. And if you cut and paste, the keyboard shortcuts aren't recognized.

Like Roland Mostoha likes this

in days where markdown is basically the goto language for documentation of developers, not supporting it is insane. 

Everyone here around me hates confluence, our devs write docs in markdown or, preferably, asciidoctor.

The management insists of having documents in  confluence. And no, we can not install addons since this is done by different division/people and it requires process no one wants to go. A quite common situation. 
So guess what, confluence gets more and more negative feelings. All the mentioned work arounds are crap. It seams Atlassian is on a suicide trip by making developers hating their solution.

I agree. In our organization we have some users who like Confluence and we are keeping some of our documents there. The problem is much of my work includes documents using Markdown format. I find it hard to believe that Markdown is not supported out of the box.

Michael Uman
Lead S/W Engineer
Wunder-Bar

Like # people like this

What other app would your developers recommend?

for devs,

something like https://antora.org/ with asciidoctor
or some home made stuff

or sphinx, with rst docs, python devs like it

then there is the 'just add markdown' to the wiki (github / lab have wikis)

whatever allows to write doc without to leave the IDE/editor currently in use

Like # people like this

Thank you. I don't think Alassian is for us. Too big bloated and crazy to get going here. We're on readme.io but have outgrown it. I'll take a look Antora and Sphinx. :)

Like Julien Bonastre likes this

This solution may not work for everyone, but I wrote a tool to do just this. It takes a markdown file and uploads it to confluence. I use it to sync my notes daily. It's not perfect, but it works: https://github.com/justmiles/go-markdown2confluence

Another importer script, written in Python (haven't tested yet): https://github.com/RittmanMead/md_to_conf

Like # people like this
11 votes
boardtc
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Nov 08, 2018 • edited Feb 11, 2019

There are a number of ways.

A. To insert markdown in the editor:

  1. Choose Insert > Markup 
  2. Select Markdown
  3. Type or paste your text - the preview will show you how it will appear on your page
  4. Choose Insert.

B. Use the Mardown macro which renders Markdown from a URL 

C. Use HTML Macro

  1. Use pandoc to convert your markdown file to html
    • e.g.  pandoc myfile.md -f markdown -s -o myfile.html
  2. On your confluence page insert a HTML macro which allows the use of HTML code within a Confluence page.
    • Note that HTML macros are disabled by default.

This doesn't work at all for me. It just pastes my text as regular body text in the page, and removes a lot of whitespace. We're using Confluence hosted by Atlassian.

Like # people like this

Me too. The preview is fine, but then it's just a big block of regular text.

Like # people like this

I get the same.  Preview looks good, but text on actual page not rendered correctly. Example:  inserted markdown has a '# HeadingExample'.  Preview looks great.  On the page, this is rendered as plain text 'h1. HeadingExample'.

Like # people like this

Same for me. Furthermore, the markup button doesn't work a second time and I have to clear my browser's "Local Storage" to be able to display it again.

But to no avail as even using it a second time accomplishes nothing.

Like # people like this

About A) 

For me the Insert/Markup(Markdown) Macro sometimes works as expected, but sometimes *not at all*  (maybe with too large contents, or missing new lines ??)

If it's not working, trying to fix it in the form also often fails (vs fixing in external editor, and re-copy&pasting into the form)  

IMO It would be great if that tool would be more powerful and robust. At least providing some 'reparse' button (in case the live editing is too tricky for large contents') or maybe it could give some hints, about issues detected while parsing the MD?!

The macro doesn't seem to exist anymore, neither does there exist an "Insert" menu anymore. When I copy *some* HTML from a page, some of it imports correctly, but things like `abc_*_foo` turn into bullet points... And when I paste the whole content, the editor acts like the clipboard is empty.

Like # people like this

works like a dream.

 

thanks you

Like boardtc likes this

Mark up > Markdown is it working at all? I mean quoting, code inserting, lists, tables e.t.c.?! Looks useless for anything more then simple headings.

I actually just copied, and pasted the rendered Markdown. Seems to work alright. The marcos were not working for me.

Indeed, copying the rendered Markdown (p.eg from VS-code "Markdown Preview") works *quite* well, BUT/except code blocks (rendered via ``` code ``` sections) are not properly migrated (just as normal text)

Does anybody know a way to also get code-blocks migrated (in a MD file)?

Like # people like this

I just copied the plain text of the markdown file into the editor, and it formatted it correctly.  Have you tried that?

Ooooh gash, I found the problem. The visual studio code is forcing my text with some info to behave like a code. I copy and paste it to sublime text and paste it to Jira and it works perfectly!

Like # people like this

If you copy markdown from VS Code and use Chrome or the Chromium based version of Edge, then you can right-click and choose "Paste as Plain Text"......contrary to how it sounds, it will render the markup correctly!

Like # people like this

Simply pasting markdown into the document works for me as well.

Hi, for everyone that has come to this topic looking for answers or wanting enhancements, it's been my experience that Atlassian doesn't prioritize work on feature requests unless there is an issue filed that generates community interest.

But since their bug/issue tracking system is buried in their website, it may be hard to find.  For Confluence Server in general, you can go here:
https://jira.atlassian.com/projects/CONFCLOUD/issues


There is a separate project for Confluence Server, if that is what you are using but I think features tend to make it into the Cloud version first.

I found an open Suggestion ticket here:

https://jira.atlassian.com/browse/CONFSERVER-58265

Given that I have come across numerous Atlassian Community posts lamenting about this for several years, I think that there is significant demand that hasn't been given proper visibility to Atlassian.

If you want this feature, please go vote for it.

If you have Notion, you can copy your markdown in it and then copy/paste it from Notion to Confluence.

No.  You cannot, if the Confluence editor doesn't recognize and render the Markdown, which it often does not for people (even if sometimes it does for other people).

Using pandoc, I just converted a page of Markdown (exported from the Notion app) into org-mode (an Emacs organizer/markup/task-management/everything "app"), and then used an export module to export that page to JIRA (Confluence) format. I could then paste that into a comment.

I wouldn't recommend it as a regular thing, but it did the job in this case, and I'm fairly fluent in all three markup languages, so I could fix something if it broke along the way.

2022 and I still can't make a table in Confluence in any way besides clicking the table icon in the editor and wasting the rest of my day.

Seems Markdown is utterly broken now with Confluence? At least when I paste in something it gets rendered as a code block and I would have to go and fiddle with every single line to get it in the format I want.

 

This doc says to just "Insert -> Markup", but there is no such option.

https://confluence.atlassian.com/doc/confluence-wiki-markup-251003035.html

I can't believe we pay for a Wiki that doesn't support Markdown properly.

Yes. Ridiculous thing is Confluence used to be great for this.
I championed and introduced Confluence into many sites as part of Documenation projects, centered on Markdown. 

But their once-'wiki' doesn't even support link-by-name anymore, nor placeholder links. 
These aren't small harmless omissions in Enterprise wiki software.
And they're not accidental either.

Now they just don't care - they want to lock as many people in so they can impose anything they like on their userbase, rather than being a part of the marketplace and the cloud competitive ethos.

The tribe working at Atlassian these days appear to have gone the 'Slack' route and are uninterested in the old 'wiki' (quick) concept.  They are treating the product as more of an advanced webpage authoring tool.  A bit like Squarespace or Wix. Nothing that is useful to me.

When I say this, I've made many polite requests on their supportbases.. they have ways of making issues seem to disappear, which are really about renaming and reclassifying things in their JIRA system.  Some of the threads.. with many hundreds of disappointed / puzzled / angry users are just amazing to read. Including the 'answers' or 'responses', which are nothing short of 'gaslighting'.

They have become low quality and thus fearful.

If your product is reliably good & high quality..
then keeping at that s the only 'stickiness' you need.

The alternative is to be whatever you like and focus your effforts on trapping users.

Confluence actually were ahead of the times, and then actively shifted to become hermitlike and scared.

Oh I earned a badge for that answer too hehe

Like Utsav Bansal likes this

I just figured out that you can do the following:

  1. Write your markdown document
  2. Open it up in Chrome or any other MD viewer. You can use an extension like this to view MD files in Chrome.
  3. Copy all content
  4. Paste on your Confluence Documentation Page.

 

It worked for me. 

This is great, my solution is similar.

  1. Write markdown in Visual Studio Code
  2. Open preview `ctrl + shift + v`
  3. Copy contents and paste into Confluence
Like 23 Studios likes this

Only good if you have 'just a handful' of markdown.

When does that ever happen?

Useless for absorbing a body of documenation.

Like Kemal Danisman likes this

My team developed a plugin that can help you, check out Markdown Extensions for Confluence.

. Here's a list of what it supports:

  • Import markdown from Github, Bitbucket, Gitlab, and generic URLs
  • Edit and preview markdown inline
  • Support for HTML within markdown
  • Offers extended markdown formatting

Nice.

This is as good as it can be, given the API limitations imposed by Atlassian.
The obstruction by Atlassian seems part of their lock-in.
Their insistance on preventing markdown usage will not serve them well in the long term.  

Like Marya Belanger likes this

@Gabriela Costa can I ask, do your auto-imported Confluence pages auto-update upon new pushes to Markdown content in Bitbucket/GitHub/Gitlab?

Like Vinu S Renish likes this

Our team uses https://github.com/justmiles/go-markdown2confluence to auto-update from Markdown content. We use Bitbucket, but it'll work with the others.

Like Dieu Nguyen likes this

@Gabriela Costa same question as @ema 

do your auto-imported Confluence pages auto-update upon new pushes to Markdown content in Bitbucket/GitHub/Gitlab?

We've been long-time users of Confluence. Personally I've always been frustrated with the WYSIWYG editor.

But then again, I've yet to see any product or plugin for any platform, successfully crack the web-based WYSIWYG editor nut. You'd think by now someone would have. But once you get to a certain level of formatting complexity, Confluence and every other web-based WYSIWYG editor starts soiling the bed. (E.g. in the case of Confluence, at some point you can't position the cursor with the keyboard, without skipping over entire sections. Or formatting one section will format whole chunks or even the entire document, the same way. Again - not unique problems to Confluence.) I think part of the problem is that if you make the mistake of changing the formatting of a section (e.g. to bullets and back to normal paragraph), rather than replacing formatting directives, it keeps adding them...in ways that confuses itself. If web-based WYSIWYG editors would just do self-linting, that would probably be a big help.

It's similar to the problem of exporting a Word document to HTML. Even if you choose "simplified", the HTML is an absolute rat's nest. Running it through HTMLTidy is usually the only way to turn it into sensible HTML, but even that's often not enough.

When we (and specifically I) really started using Markdown, it was like a revelation. Finally, a way to do reasonably sophisticated formatting in a way that you have total control over the formatting directives, and it never gets confused. I use Markdown everywhere now.

But I was shocked to learn that Confluence can't to Markdown!

Suddenly, Confluence feels stone-age and very limited. Thinking of other possible shared documentation repository solutions...

1 vote
Nar Kumar C_ - Narva Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Nov 02, 2019 • edited

Hi Jason,

We released an add-on which allows importing documents from different file formats like Markdown, Word, ODT and many others: All-in-one File Importer for Confluence

Please give it a try and give us feedback if you see any issues. You can install from here:

https://marketplace.atlassian.com/apps/1221333/all-in-one-file-importer-for-confluence

Currently this add-on works on Confluence cloud. If there is enough interest from Atlassian community, we are more than happy to release server version.

If you you have intermediate familiarity with Python, you may be able to create a simple utility that takes as input a MarkDown file, and creates a Confluence page (as a child of an existing ancestor) that is consistently styled. The utility will use Confluence Remote API, Python Requests, and Python Markdown.

Here are some resources for you:

Python Requests: http://docs.python-requests.org/en/master/

Python Markdown: http://pythonhosted.org/Markdown/

Confluence Server REST API: https://developer.atlassian.com/confdev/confluence-server-rest-api

Page Information: https://confluence.atlassian.com/conf510/view-page-information-829077461.html

The Page Information link is there because the Confluence Server REST API uses Page IDs, and you can use the Page Information menu item to obtain the Page ID of the Confluence page you're viewing.

1 vote
Rob Woodgate
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 31, 2017

Hi Jason,

These are the markdown add-ons that support server installations.  Of these, the only one that appears to do something close to an import is Marked, which is free and has very good reviews.  It allows you to point to a markdown file and show it in a Confluence page.

If this is a one time transfer of .md files, you might want to consider spinning up a free trial version of Confluence Cloud, installing the trial version of one of the Cloud markdown import add-ons (e.g. Confluence Pandoc), performing the import and then exporting the space and importing it into your server instance. (I've never tried this, so I don't know if it's possible, but it's worth exploring if you've got a large amount to import.)

 

0 votes
yasn77
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Feb 13, 2023

I've come across this thread pretty late and thought I would include a Python module/script I wrote that converts Markdown to Confluence.

However, I haven't really maintained it (it worked fine the last I used it), so I think the suggestion from Jim Cooper might be better -> https://github.com/justmiles/go-markdown2confluence

My repo is here -> https://github.com/yasn77/readme2confluence

Another option I found to workaround this wiki that doesn't support Markdown:

 

Paste the Markdown-formatted plain text in a new Jira ticket's description field with "Text" mode selected, then switch to the preview using the "Visual" mode and copy/paste this into Confluence's new page editor.

Similar to other workarounds, but uses Atlassian's own product. YMMV with other Jira variants, we have Server.

Thanks Brett - this worked perfectly for me, and was definitely the least fuss. 

The way JIRA converts markdown is exactly the way Confluence should convert markdown...

 

EDIT:
Well.. almost - links to locations in the same document don't appear to work.. grr.

Try copying from your code editor and using 'Paste and Match Style' in Confluence - it should do the trick! 

My markdown is in VSCode and I have a new page created in Confluence open in Google Chrome. I did not install any plugins or add-ons to Confluence.

I was experiencing similar behavior to others above where pasting markdown from VSCode resulted in code blocks and the markdown was not converted. I tried cmd+shift+v as well which produced a text result that interpreted bullets in a single level list and that was pretty much the only thing that got converted. 

However, I just found that I was able to paste in large amounts of markdown text into the Confluence editor with correct conversion of all elements by right clicking and selecting 'Paste and Match Style'. 

As an example I've included several screenshots:

1 - My markdown in VSCode

 1-MD in VSCode.png

2 - Result of cmd+v 👎   

2-cmd+v.png

3 - Result of cmd+shift+v 👎    

3-cmd+shift+v.png

4 - Right Click Menu in Confluence editor

4-Right Click Menu.png

5 - Result of "Paste and Match Style" 🥳

 

5-Paste and Match Style.png

Hope this helps! This worked for my use case as I have just a few pages I need to import, and copying and pasting each page won't be too much trouble for me. I recognize this solution might not work for those wishing to import several markdown files at once. 

 

 

What browser are you using?  I don't see a 'paste and match style' option

 

Screenshot from 2022-05-20 14-57-09.png

Per the second sentence of my comment: 

"My markdown is in VSCode and I have a new page created in Confluence open in Google Chrome. I did not install any plugins or add-ons to Confluence."

'paste and match' seems to be a Mac thing.  Explains why it's not there on linux chrome or firefox.

Like Alexandra Shumway likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events