Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add code block macro in markdown

Mark L
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!
September 15, 2023

Hi, I am using markdown to edit the confluence page. I am wondering how to use the code block macro in markdown. 

1 answer

0 votes
Andrii Maliuta
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.
September 16, 2023

Hello @Mark L .

Welcome to community.

The code should be:

{code:title=This is my title|theme=FadeToGrey|linenumbers=true|language=java|firstline=0001|collapse=true}
This is my code
{code}`

 

You can find the markup examples in the documentation for each macro:

https://confluence.atlassian.com/doc/code-block-macro-139390.html

Mark L
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!
September 19, 2023

Thanks Andrii. I believe this is for wiki markup. I am actually using markdown to edit my page.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events