Forum Discussion
Why does Teams always strip indentation when pasting text?
- May 14, 2021
my-kl
So I got to the heart of the matter. I used the https://evercoder.github.io/clipboard-inspector/ to inspect the contents of clipboard when copying the same text from two different apps. Both have two entries. One of the entries is text/html and one is text/plain. The text/plain as you might guess is identical. The html is quite different. I then copied the html and rendered.
This is what I see from TextEditThis is what I see from Visual Studio Code
So this would appear to be an issue with my environment in Visual Studio Code (or even a defect in Code, I"m not sure)
my-kl This definitely should not be closed, I do not use vscode and I still have the following issues on OSX\MSTeams:
1. no markdown support (some garbage WYSIWYG constantly interfering with my typing).
2. ``` no longer creates code blocks 90% of the time. In fact, the closing ``` becomes a weird empty code block more often than the opening code block ever works.
3. pretty much everything I paste into MSTeams has it's formatting removed, so nobody can read it.
- my-klOct 14, 2021Brass Contributor
1. no markdown support (some garbage WYSIWYG constantly interfering with my typing).
2. ``` no longer creates code blocks 90% of the time. In fact, the closing ``` becomes a weird empty code block more often than the opening code block ever works.Seems like a different issue. I have found that markdown for code blocks doesn't work for me in "Chat" but works just fine in "Channels". I would have expected it to work everywhere.
- Adam ŻmudaOct 19, 2021Copper ContributorI'm using PyCharm and have the same problem.
I can paste into a code block in a channel just fine, but if I paste into a conversation I lose indenting.- bobh_Oct 29, 2021Copper ContributorTurns out you can paste into a monospace block in a channel, copy the text back out and then paste into a monospace block in a chat and it works. You don't need to actually send the message to the channel.
It's a pain but it works.
- WeetAOct 14, 2021Copper ContributorAnother thing which doesn't work too on chats: CTRL+A to select all when you write a message.
It worked by the past.
Now, it only works on channels' conversations- pedorroOct 14, 2021Copper ContributorYes - definitely still an issue. A couple of weeks ago, the regular ``` stopped switching immediately to a code box. Now it requires a space after it, and then it does not retain formatting. As noted elsewhere, this is only broken in Chats. The original (functional) behavior is still present in channels.
- WeetAOct 14, 2021Copper ContributorYou're right.
I didn't pay attention.
It only works now on channels
- my-klOct 14, 2021Brass Contributor
3. pretty much everything I paste into MSTeams has it's formatting removed, so nobody can read it.
Good to know. Could you list some of the programs you've tested with. As I've learned, I can copy from TextEdit into Teams without issue. So my work around is copy/paste from VS Code into TextEdit and then copy/paste from there into Teams. With respect to VS Code it seems to be a VS Code issue. I also can copy/paste from Visual Studio without problem.
What programs are you having trouble with. I'd be interested in trying to reproduce.
- bobh_Oct 29, 2021Copper ContributorI tried this. But, when I paste from TextEdit the text IS indented ... but the line breaks are duplicated. I'm taking a similar approach now but using a channel message as the intermediary rather than TextEdit.
- daedelus82Nov 08, 2021Copper Contributor
I had issues pasting from vscode into other apps, including teams.
Workaround for me is disabling the following in vscode.
editor.copyWithSyntaxHighlighting