Code Formatting

Keith Furman
Occasional Contributor

My developers miss the ability to format their pasted code like they used to in HipChat. Any plans on adding this soon?

21 Replies
Yes, this is one of our most highly requested features and we will be adding support for code formatting very soon. Stay tuned! :)

Any update on this feature?

Also looking for any update on this? I've got my teams ready to switch off of Slack but the missing Code Snippets is a hurdle for getting developer buy in.

Checking back on this feature request, any timeline?  Once this hits, we can say goodbye to HipChat forever.

This feature is now available.

Use markdown syntax such as  `code` or 





(ie backticks)

Is there an update that allows this functionality?  I've closed and restarted Teams and didn't receive any notification of an update, tried to format some code and it didn't work:



public class TestMe


    public string TestSomething { get; set; }



It might be still rolling out to tenants, but here it is in action:

And here it is; Markdown in #MicrosoftTeams:

— Wictor Wilén (@wictor) March 2, 2017

Give it a few more days

It finally updated and YAY!  We have code formatting now.  Thanks so much for the great news Wictor!

This is great, thanks for the update.  Now the next logical question -- does it work on the mobile client?

Not yet...

Any plan to handle syntax highlighting?

Code formatting still not working here. Somebody mentioned it might be related to the language used for input (see ). Is that a correct assumption and if so will it be fixed?

If you paste in the text of the code into the message box and then click on the Expand compose box for formatting button on the bottom left (it looks like an A with a paintbrush) Then at the top of the compose box there will be a drop down list of Paragraph formatting options, choose Code.

@Wictor Wilen wrote:

This feature is now available.



Any way to switch it off? Also, any way to switch off "Smart paste", wherein Teams tries to format stuff I've copied from elsewhere and into a Teams message. I do not - and never will - want the format copied between apps.


I'm fine with it having formatting shortcuts, but I want it to be an *active* choice on my part; I don't want Teams trying to be "helpful" and doing it for me.


/me remembers Clippy...






Hello, any idea when this is going to be added?

Given that paste strips out linefeeds, this is of very limited use. I don't tend to retype code from scratch :(


Although there is a way to paste pre-formatted code, it would be nice if this feature actually supported syntax highlighting like slack / hipchat.

Code formatting does not work when I use markdown. I tried Firefox, Chrome, Windows EXE, Android App, still no success. It makes my wonder that the MS support page ( )does show a working example:

Capture.JPGAny hints? - Thanks Markus

Make sure to use the backtick ` and not the single quote/apostrophe '

Same.  It just makes a gray box without any highlighting.

Related Conversations
Embed code not Supported in Sway!
James Harvey in Microsoft Stream Forum on
4 Replies
UK code support PSTN Calling
SB V in Skype for Business IT Pro on
2 Replies
Deleted in Excel on
5 Replies
SPFx Webpart and MSGraphClient
Stefan Kießig in Developer on
0 Replies