Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I paste Markdown in Microsoft Teams?

I am trying to paste markdown in Microsoft Teams to speed up my workflow, but the pasted markdown remains as text. When I type the markdown myself, it works (as you can see on the screenshot). Sending the message as is doesn't help either.

I know that Microsoft Teams support markdown. Is there a workaround this?

Markdown unformatted in Microsoft Teams

like image 925
Jeremie Avatar asked Mar 06 '19 02:03

Jeremie


People also ask

Does Microsoft Teams use Markdown?

Teams supports a subset of Markdown and XML (HTML) formatting tags. Currently, the following limitations apply: Text-only messages do not support table formatting.

Does Teams chat support Markdown?

Markdown is a simple way to format text using ordinary punctuation marks, and it's very useful in Microsoft 365. For example, Microsoft Teams supports markdown formatting in chat messages and SharePoint has a Markdown web part.

How do you paste text in Microsoft Teams?

As a workaround, users can paste as plain text by hitting Ctrl + Shift + V, but we understand this doesn't help if you are not the one copy and pasting. We'll pass this along to the team. Any updates? , any updates?

Does Teams Wiki support Markdown?

Microsoft Teams now supports Markdown in Wiki, allowing users to to use the same syntax that applies to chats and messaging to format Wiki sections. Microsoft Teams launched support for Markdown in February.


2 Answers

It is a known issue, and as far as I know, Microsoft doesn't seem to be working on it.

One way to work this around (as you allowed workarounds) is to paste your markdown code to any editor/converter that produces rich text, copy the rich text, and paste it to Microsoft Teams.

Any online markdown editor will work. I tested with Dillenger and StackEdit but I'm quite sure there are many other online editors you can paste your markdown code, copy the preview, and paste into Teams.

If you are using VSCode, you can use the native markdown preview to generate a rich text, copy from it, and paste into Teams. Both Teams and Code are MS products so I guess they would work well together (just guessing with no hard argument). At least the pasted result seems good enough to me.

like image 64
Ignatius Avatar answered Sep 30 '22 08:09

Ignatius


If you have pandoc and powershell; the following converts your markdown to interpreted HTML;

Get-Clipboard | pandoc | Set-Clipboard -AsHtml

I find this a useful workaround because my markdown is usually coming from where I take my notes; vim. So in vim I can bind;

" In visual mode, Shift-v to copy selection to clipboard
vn V "+y
" In normal mode, Ctrl-m to convert clipboard Markdown to interpreted HTML
nn <c-m> :! powershell -Command "Get-Clipboard \| pandoc \| Set-Clipboard -AsHtml"<cr>

And I'm shift-v, ctrl-m away from having pretty notes on my clipboard to paste into Teams.

I think it's not also a stretch to imagine a Teams Extension that would do this in Teams.

Edit: I was getting some encoding issues. The command in my vimrc has evolved as follows.

nn <c-m> :silent ! powershell -Command "[Console]::OutputEncoding = [Text.Encoding]::Default; Get-Clipboard \| pandoc \| Set-Clipboard -AsHtml;"<cr>
like image 26
Adam Avatar answered Sep 30 '22 08:09

Adam