Code formatting and syntax coloring don't work
Asked by Olivier Levrey:

Hi,

I'm a using Confluence Cloud and I am trying to insert code on a page.

When I type /code, the code snippet macro appears properly but code formatting and syntax coloring don't seem to work.

This is an example of what I get :

![Capture.PNG](/t5/image/serverpage/image-id/60036i0E57F94FFBF96578/image-size/large?v=v2&px=999 "Capture.PNG")

When typing an open parenthesis or curly bracket, it automatically adds the closing one, but that's all. Not indentation, no colors.

Selecting another langage doesn't change anything.

Any idea of how I can get syntax coloring to work?

One more thing: in Confluence settings, I've set "Configure Code Macro" to the followings:

* Default theme : Confluence
* Default langage : Java

Although these settings are saved, when I add a new code block, the selected langage is not set to Java.

Tested on Chrome and FireFox with same problem.

Thanks in advance!


Answers:
author: Manon Soubies-Camy
body: Hi [@Olivier Levrey](/t5/user/viewprofilepage/user-id/2984566) and welcome to Community!

It looks like you're using the new Confluence Cloud editor ([more information here](https://confluence.atlassian.com/confcloud/confluence-editing-improvements-945107733.html)), which is why you don't have as much customization as expected. This is already tracked here: [Allow further customization of the "Code" macro in the new editor](https://jira.atlassian.com/browse/CONFCLOUD-66437). You can add yourself as watcher to be updated and you also can vote for this feature to show your interest.

You also can detail your feedback directly from Confluence:

![feedback.png](https://community.atlassian.com/t5/image/serverpage/image-id/60049iCB3C8CC88758D629/image-dimensions/480x352?v=v2 "feedback.png")

Hope this helps,

- Manon

comments: author: Olivier Levrey
body: Thank you Manon.

I found the first link you gave after Googling a little bit, but I couldn't find the track link! I added myself as watcher as you suggested and upvoted the issue.

I am waiting for it to be resolved now...

By the way: since I am new to Confluence, I don't know much about the previous editor, but I find the new one very clean and easy to use!


author: Tim
body: Same issue with C#... but does color coding with other formats such as JSON...


author: dylan
body: This still happens days away from 2022 - no color, and super limited features. If I highlight existing text and want to turn it into code, it won't work.

If I want to copy+paste multi-line code into the block, **it'll just dump it on 1 line!**

All kinds of unexpected bugs.


author: James
body: **I'm also going to say that this ticket should still be open** .

Here's my confluence "code snippet ... with syntax highlighting"

![Screenshot 2022-01-14 104726.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/177706i70C35684EC18A6AA/image-size/large?v=v2&px=999 "Screenshot 2022-01-14 104726.jpg") using the

![Screenshot 2022-01-14 105315.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/177710iF5E3F53F0446C317/image-size/large?v=v2&px=999 "Screenshot 2022-01-14 105315.jpg")

and here's what SQL Server Management Studio can manage

![Screenshot 2022-01-14 104828.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/177712i255D033F00079FD1/image-size/large?v=v2&px=999 "Screenshot 2022-01-14 104828.jpg")

If the Lumi?re brothers could reproduce color way back in 1907, I think Atlassian can manage it in 2022.


author: James
body: In the interests of showing that full testing should be completed before engaging mouth, I have left my previous response untouched.

What I have subsequently discovered is that it's only grayscale in edit, and that publishing does make a difference.

However, it's still not great for SQL and I would like to see Atlassian make a better attempt.

Here's the Confluence page when published

![Screenshot 2022-01-14 122227.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/177726i8A3694666A0828F4/image-size/large?v=v2&px=999 "Screenshot 2022-01-14 122227.jpg")

For balance, Notepad++ can only do similar with Language set to SQL, but then it's a free product and not expected to be bells and whistles.

![Screenshot 2022-01-14 122543.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/177727i427D302763F9145A/image-size/large?v=v2&px=999 "Screenshot 2022-01-14 122543.jpg")


author: dylan
body: I'm confused: Why would a new editor (on a premium service) lose such a major feature that *everyone else* seems to have *except* Atlassian (*...where even free competitors seem to support this*)?

Readability is an important feature to those that collaborate with devs for 8 hours/day (on a premium product that's expected to have such a standard feature)**.**


author: Torquil Harkness
body: Oh not another example of the New and Improved Confluence... reducing the quality of the user experience!! It seems that every time i come to google why something does not work in Confluence or Jira, it is because we are using the NEW AND IMPROVED version???

comments: author: dylan
body: **Hear, hear!** If, at minimum, it does not have the previous features - it's not an upgrade and should remain in alpha-beta. Please either revert for releasing an alpha-like downgrade, or replace the missing features.

For a premium, enterprise service, we *shouldn't even have to ask* for the most minimal, standard expectations.


Tags: cloud

confluence-cloud