how can I specify the type of code in a code block ?

When I paste code in a code-block can I specify what language the code is in ?

In my specific case some code is detected in the wrong language and the highlighting looks strange.

I still remember the wiki markup ( code:xml , code:sql etc), but there seems to be no equivalent in the 'edit' popup to select the type of code.

2 answers

1 accepted

This widget could not be displayed.

Are you using the latest version of the plugin? Please check in the Conlfuence Administration if you are using the latest version of the Code Macro Plugin.

I'm using the Confluence 4.1 , with version 2.0.8 of the Code Macro Plugin (from Atlassian)

  • Are all modules enabled?
  • Have you changed something in the configuration of the plugin?

Also, I used to have the 'new code' plugin installed before we upgraded, maybe this is causing issues ?

all 22 modules are enabled


I just installed Confluence 4.1 as well because I thought that the problem might have something to do with the latest version of Confluence. But everything seems to work well in that version as well.

Yes it might well be that the use of the new code macro prior to the upgrade is the culprit here. Unfortunately I'm out of ideas and I can't help you any further. I suggest you report this porblem with Atlassian.



Thanks for checking, I'll contact Atlassian support.

This widget could not be displayed.

You have to edit the codeblock with the "Edit" Button. In the macro Browser you could change the language (The first dropdown)

what to do if there is no dropdown ?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

199 views 2 4
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