Insert markdown not working properly in Confluence Wiki
Asked by Pelle Boese:

Hi,

The menu item "+" -\> "Markup" has two problems. We can repoduce this behaviour on more than one machines. We want to use it to insert markdown code. The preview for our simple Markdown document looks fine. As soon as we insert it though, it looks doesn't look anything like the preview and, for example, list items are displayed wrong.

Also, we cannot open the "Markup" menu again after inserting our Markup code. After clicking on the menu item, Chrome shows the following error in the console:

Uncaught SyntaxError: Unexpected token M in JSON at position 0  
at JSON.parse (\<anonymous\>)  
at Object.get (persistent-storage.js:29)  
at Mn (editor_plugin_src.js:97)  
at UC.\<anonymous\> (editor_plugin_src.js:387)  
at i.exec.\<computed\> (atlassian-editor.min.js:1)  
at T.execCommand (atlassian-editor.min.js:1)  
at UC.execCommand (atlassian-editor.min.js:12)  
at UC.b \[as execCommand\] (batch.js?externals=__local-default__\&locale=en-GB:508)  
at adg3-plugin.js:160  
at HTMLLIElement.\<anonymous\> (adg3-plugin.js:441)

![Screenshot 2019-06-03 at 09.37.53.png](/t5/image/serverpage/image-id/56362iF9A81D8A80F1B2D4/image-size/large?v=v2&px=999 "Screenshot 2019-06-03 at 09.37.53.png")


Answers:
author: Shannon S
body: Hello Pelle,

Welcome to Community! It's nice to meet you.

I believe you might be referring to this bug below:

* [CONFCLOUD-65842](https://jira.atlassian.com/browse/CONFCLOUD-65842) *Markdown is saved as Confluence Wiki on the preview regardless of language mode*

Codes are being rendered in Confluence Wiki format instead of Markdown. You can find the current workarounds listed on the link above.

Your 2nd problem is also a bug below:

* [CONFCLOUD-65663](https://jira.atlassian.com/browse/CONFCLOUD-65663) *Cannot add more than one Markup Macro in TinyMCE Editor Pages*

Unfortunately, this bug does not have a workaround.

I would recommend that you click **This affects my team** on both in order to help us keep track of the number of affected users. This will also have you automatically watch the bugs, and you will receive automatic updates in the future.

Let me know if you have any trouble!

Regards,

Shannon

comments: author: Dan Walker
body: Problem is you can't vote on the second issue link cos it's been closed with "Won't Fix".

There is a link in one of the comment stack for a different issue to revive the Markup macro, which I've voted for :

[Support Markdown for the new editor](https://jira.atlassian.com/browse/CONFCLOUD-65756)  

We're having this issue also, and are using the latest cloud based confluence. More janky implementations of previously stable features, lack of testing from the looks of it. I feel your pain...

Also, apparently you can hack and thrash the markup macro back into action by force clearing your local storage for Confluence as per one of the tickets above. Fingers crossed you don't waste all your time and money having to move to a different wiki based resource!!!!


author: Shannon S
body: Hi Dan,

Apologies for the oversight, it looks like it was closed shortly before I shared the bug here.

It appears that this issue is closed due to the fact that it only affects the old editor, which is being discontinued. In the new editor, you should not run into this issue. Can you verify with me if while using the new editing experience you also run into the case?

Note: that if your Confluence is on the new version of Cloud it can still be using both the old and new editor in places. Certain templates use this such as the **New editing experience**template and Blog posts. You will be able to tell if you're using the new editor by looking for the Publish button in the top-right hand corner of the editor.

Thank you for sharing the feature request [CONFCLOUD-65756](https://jira.atlassian.com/browse/CONFCLOUD-65756) *Support Markdown for the new editor*.

Take care,

Shannon


author: Dan Walker
body: Hi Shannon,

Thanks for the reply!

I think now you mention it I'm using the classic view, this might be in part because I switched back to Classic view in JIRA when I ran into issues "Creating a Linked Issue" in Next Gen (I believe <https://jira.atlassian.com/browse/JSWCLOUD-13625>), so I rage reset everything back to classic and got my context menu and "Create linked issue" back! Never looked back!! haha

For me, the publish button is in a footer on the right (bottom under page), here's a screen...

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/61554iE57C22697FEF77D0/image-size/large?v=v2&px=999 "Capture.PNG")

The fix did work for me however and I've moved on, resigned to the fact that MarkDown ain't worth the time to get it on the template :D  

I am a site admin in a number of companies so can't guarantee I've not got the new editor going "somewhere", haha, but this does just add confusion to the stack doesn't it? new editor, macro's and functions look the same so you think you can just keep running with it only to be plagued with issues that are unexpected.

If as you assert, I am using the classic editor then it makes sense but I don't like to be behind the times, so the vote for markdown support (or the return of the markdown lacro\['macro', type-o! what the heck is a lacro!!!\]) in the new experience is just as valid for my vote! Alot of my team eat live and breath markdown (even when they write emails you can catch the odd \~\~ or __ instead of actual formatting!) and instinct is a hard thing to change! :D


author: Shannon S
body: Hello Dan,

Thank you for confirming. Indeed, you appear to still be using the old editor in Confluence according to your screenshot.

Thank you for providing your feedback and feel free to reach out to the [Cloud Support Team](https://support.atlassian.com/contact) if you have any issues accessing the new editor.

Regards,

Shannon


Tags: cloud

confluence-cloud