JSON syntax highlighting in confluence code block

How i can make JSON syntax highlighting in confluence in code block?

2 answers

1 vote

Sounds like what you need is a Better Code Macro for Confluence Cloud: https://cloud-code-macro.atlassian.io/redirect/install

I wrote this add-on and I think it's pretty cool! Let me know what you think.

It is pretty cool but the preview does not work. I'm able to add "better code block" macros but when I hit preview in my Confluence document I briefly see a waiting gear where the better code block macros are but then I see nothing in the place where the waiting gears were. If I hit save I see the code blocks rendered as expected.

Can this macro be installed on Confluence server?

Also, it seems that the default code macro doesn't display the color highlighting when used in Questions.  Why would this be?  Isn't it the same code macro in both the page editor and Questions editor?

How does one make a new macro appear in the macro browser when trying to insert code in Questions?  Only the default code macro appears.

This add-on is only available for Atlassian Cloud. Sorry.

In questions you should be able to start with the { character to load macros. 

We have developed a Confluence  macro  which provides syntax highlighting for JSON Objects . 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,780 views 26 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you