Cannot copy a specfic text from code block in Teams chat

Anand Venkatachalapathy 51 Reputation points
2021-06-22T18:31:55.367+00:00

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.
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,145 questions
{count} votes

Accepted answer
  1. JimmyYang-MSFT 49,186 Reputation points Microsoft Vendor
    2021-06-23T05:38:22.427+00:00

    Hi @Anand Venkatachalapathy

    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.

    1 person found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Dejan 26 Reputation points
    2021-06-28T18:50:53.58+00:00

    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 people found this answer helpful.

  2. Błażej (Blaise) Michalik 1 Reputation point
    2021-08-16T00:15:36.093+00:00

  3. Aleksandr Lobaev 0 Reputation points
    2023-06-23T08:02:44.93+00:00

    How the hell it is even possible not to fix this issue till now? Microsoft Developers, is it a joke?

    0 comments No comments