# Cannot copy code block text

**URL:** <https://forums.powershell.org/t/cannot-copy-code-block-text/11506>\
**Category:** Website & Forum Feedback\
**Created:** [October 19, 2018, 4:00am UTC](https://forums.powershell.org/t/cannot-copy-code-block-text/11506 "2018-10-19T04:00:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![philipries](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@philipries](https://forums.powershell.org/u/philipries)\
**Post date:** [October 19, 2018, 4:00am UTC](https://forums.powershell.org/t/cannot-copy-code-block-text/11506/1 "2018-10-19T04:00:02Z")

</div>

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](https://powershell.org/forums/topic/default-sort-property/#post-84916) (edit- linkified)

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [October 19, 2018, 4:25am UTC](https://forums.powershell.org/t/cannot-copy-code-block-text/11506/2 "2018-10-19T04:25:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![philipries](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@philipries](https://forums.powershell.org/u/philipries)\
**Post date:** [October 19, 2018, 12:06pm UTC](https://forums.powershell.org/t/cannot-copy-code-block-text/11506/3 "2018-10-19T12:06:51Z")

</div>

> [@](#):
>
> Can you try “Open Code in new window” option(the middle one) and copy.

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

---

<div class="post-metadata">

**Author:** ![ta11ow](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/ta11ow/32/131_2.png) [@ta11ow](https://forums.powershell.org/u/ta11ow)\
**Post date:** [October 23, 2018, 10:52am UTC](https://forums.powershell.org/t/cannot-copy-code-block-text/11506/4 "2018-10-23T10:52:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![philipries](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@philipries](https://forums.powershell.org/u/philipries)\
**Post date:** [October 24, 2018, 2:51pm UTC](https://forums.powershell.org/t/cannot-copy-code-block-text/11506/5 "2018-10-24T14:51:14Z")

</div>

Tested - you are right as well.

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

---

<div class="post-metadata">

**Author:** ![ta11ow](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/ta11ow/32/131_2.png) [@ta11ow](https://forums.powershell.org/u/ta11ow)\
**Post date:** [October 30, 2018, 7:12am UTC](https://forums.powershell.org/t/cannot-copy-code-block-text/11506/6 "2018-10-30T07:12:30Z")

</div>

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.

&nbsp;
