34

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

genpfault
  • 51,148
  • 11
  • 85
  • 139
Jeremie
  • 2,241
  • 2
  • 17
  • 25
  • 1
    If teams isn't supporting pasted markdown on purpose, then it would be ideal if you could paste in a bunch of markdown, then hit a button to rerender everything that you pasted as rich text from markdown, instead of it not working at all, or it working kind of if you delete one side of it the markdown and then type it back in. (though that solution isn't viable for many lines of markdown) – jgstew Sep 10 '20 at 23:36

3 Answers3

49

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.

Ignatius
  • 2,745
  • 2
  • 20
  • 32
  • Thank you for your comment. This is what I have been doing so far. – Jeremie Mar 06 '19 at 04:39
  • 2
    Sorry I didn't add anything to help your situation. AFAIK Teams just doesn't have the feature. – Ignatius Mar 06 '19 at 05:35
  • 2
    I am using Teams like few hours. It appears it is not **built on markdown** , if that is the case I have to look elsewhere. Even that would mean more time spent on coaching non-technical people in org. – Chef Gladiator Jul 23 '19 at 07:22
  • 1
    Perhaps a better solution than what I used… ie. for example for bold, removing the ending start and typing it back… Then the part is bold. But if, for example, you have `*Foo:*` and your deletion / typing is too fast, it changes the `:*` to an emoji… Very consistent… – PhiLho Aug 20 '20 at 14:40
  • 1
    For bigger chunks of markdown that might work but still - typing (multiple?) single line code block(s) with backticks really drives me crazy as the cursor moves to (what feels like) random places during typing while the starting backtick gets removed and the ending one not. I cannot imagine that the MS Teams devs really use it themselfs because in my humble opinion they would have fixed it for the sake of their own sanity. – Sandro May 05 '21 at 15:08
  • Shameless plug for Obsidian, where you can write markdown then hit a button and render it. After that you can copy and paste into teams. Lots of other cool features for a really easy to use note taking app. – SKyJim Jun 24 '21 at 15:25
  • This seems to work on Mac - paste some formatted table (e.g., output from `knitr::kable()`) from RStudio into TextEdit, then paste that into a code block (```) in Teams. – Brian D Mar 10 '22 at 20:56
  • When copying from VSCode, the text retains the color that it is given in VSCode. If your VSCode is in dark mode and your Teams is in light mode (or your recepient's Teams is in light mode), then the text will appear white on white except for links and code. – georch Mar 14 '22 at 19:47
7

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>
Adam
  • 4,180
  • 2
  • 27
  • 31
  • I used this to fix encoding issues for one-off jobs, slightly easier for me to remember if my markdown is ascii anyways: `Get-Clipboard | pandoc --ascii | Set-Clipboard -AsHtml` – MHebes May 13 '22 at 17:11
2

I've stumbled on the same issue, and found a cute way, especially if you're already using VS Code as your preferred editor.

Start up VS Code, open up a new markdown file - use Ctrl+K, M to switch the language to Markdown, type your fancy message, click on the Open Preview to the Side option, copy the preview and paste in Teams. It works pretty well.

Tested on Windows only, though.