question

AnandVenkatachalapathy-9606 avatar image
1 Vote"
AnandVenkatachalapathy-9606 asked BaejBlaiseMichalik-1143 edited

Cannot copy a specfic text from code block in Teams chat

We send/receive a chat with code block (code entered in text box by pressing ```). If any user selects and copy a specific text or line from the code block, it pastes ENTIRE code block instead of copied specific text from the block.

For example:
code block in the Teams chat:
[
xxx xxxxxxx xxxxx
10.10.20.30
ababba ccdfclkd
akd;klasdj;f
]

I couldn't copy paste only the IP address from this code block. It can be reproduced on Windows and Mac clients.

It driving crazy for your users. Please fix this bug.

office-teams-windows-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JimmyYang-MSFT avatar image
1 Vote"
JimmyYang-MSFT answered BaejBlaiseMichalik-1143 commented

Hi @AnandVenkatachalapathy-9606

What is your version of Teams client?

Could you try to follow these steps to see if it works for you?

1)Click "Format" icon in Teams text.
108380-image.png
2)Select "Code snippet"to insert your code.
108452-image.png

3)After we send the code and we can copy the IP address from it normally
108462-image.png


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


image.png (4.8 KiB)
image.png (8.8 KiB)
image.png (6.4 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello Jimmy Yang,
Thanks for helping.

Yes I can copy/paste a specific text If I use code-snippet. So, we should stop using ``` for sending code.

I am going to read the difference between code snippet and ``` box.

Anand

0 Votes 0 ·

@JimmyYang-MSFT Code snippets are not the same thing as code blocks.

The issue here lies in text selection of a rendered code block, i.e. the block that is written using ``` characters.

Currently it is impossible to select only a single line of text from a code block in a message, be it someone else's or your own.

0 Votes 0 ·
Dejan-8749 avatar image
2 Votes"
Dejan-8749 answered

Clicking on the UI "code snippet" option produces the code markdown and is the same thing.
However you enter contents into the code snippet from within Teams allows you to copy partial data. That is not the issue.
Creating content from an external source ie, Notepad, script and move it in the code snippet then try to copy partial data, everything is copied into the clipboard buffer using Ctrl+C or Ctrl+X yields the same result.

Please reopen issue and have another go at this.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BaejBlaiseMichalik-1143 avatar image
0 Votes"
BaejBlaiseMichalik-1143 answered BaejBlaiseMichalik-1143 edited
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.