Cannot copy code block text

Welcome Forums Web Site Feedback & Assistance Cannot copy code block text

This topic contains 5 replies, has 3 voices, and was last updated by

 
Participant
7 months, 2 weeks ago.

  • Author
    Posts
  • #114537

    Participant
    Topics: 1
    Replies: 2
    Points: 4
    Rank: Member

    More precisely, the code block text copies wrong.

    Bug 1: The text pastes into Notepad without line breaks.

    Bug 2: The text pastes into Powershell with all the lines reversed!

    Can provide screenshots if you don't believe me 🙂

    I'm using the latest Chrome on Windows.

    Example code block: https://powershell.org/forums/topic/default-sort-property/#post-84916 (edit- linkified)

  • #114582

    Moderator
    Topics: 8
    Replies: 871
    Points: 2,661
    Helping Hand
    Rank: Community Hero

    I don't face this problem, I tried in Internet Explorer and Edge(I don't use any other browsers).

    Can you try "Open Code in new window" option(the middle one) and copy.

  • #114793

    Participant
    Topics: 1
    Replies: 2
    Points: 4
    Rank: Member

    Can you try "Open Code in new window" option(the middle one) and copy.

    Tested – Neither issue appears when using the separate window button.

  • #118128

    Participant
    Topics: 2
    Replies: 442
    Points: 918
    Helping Hand
    Rank: Major Contributor

    This is partially a bug with the right-click paste in PS itself, as well. If you use Ctrl+V to paste instead, I believe the issue disappears.

    • #118686

      Participant
      Topics: 1
      Replies: 2
      Points: 4
      Rank: Member

      Tested – you are right as well.

      I do hope the site gets fixed so that snippets can be shared more smoothly like other places.

    • #119995

      Participant
      Topics: 2
      Replies: 442
      Points: 918
      Helping Hand
      Rank: Major Contributor

      Aye. I'm not sure exactly what causes it, but I've seen it when pasting from a few other websites as well. Something about the way it ends up getting shunted to the clipboard isn't quite right.

       

The topic ‘Cannot copy code block text’ is closed to new replies.