Title: Copy button shows code upside down when paste
Last modified: January 20, 2022

---

# Copy button shows code upside down when paste

 *  Resolved [worldsdream](https://wordpress.org/support/users/worldsdream/)
 * (@worldsdream)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/)
 * Hi Jeff,
 * I updated to the latest version and there is one issue.
 * When I use the copy button, it shows upside down in PowerShell.
 * When I paste the code in notepad, everything looks good.
 * Something changed, because when I rollback to the previous version, it works 
   as expected.
 * Thanks

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15274104)
 * Hi worldsdream, I’m not seeing it on default WordPress install, so it must be
   something local to your theme. You can temporarily switch to one of the default
   WP themes to see how it displays normally.
 *  Thread Starter [worldsdream](https://wordpress.org/support/users/worldsdream/)
 * (@worldsdream)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15274108)
 * Hi Jeff,
 * Do you have PowerShell (Windows system)?
 * I have tested this on the default theme without any plugins. I also did a clean
   WP install (XAMPP) with only the default theme and prismatic. Downgrading to 
   version 2.9.1 works.
 * People started messaging that they copy, and the commands are corrupted. But,
   after investigating, I saw that the lines were upside down.
 * For example:
 * test1
    test2 test3
 * In the back-end: [https://i.imgur.com/JygcnY6.png](https://i.imgur.com/JygcnY6.png)
 * In the front-end: [https://i.imgur.com/c3oQZPU.png](https://i.imgur.com/c3oQZPU.png)
 * Clik on the COPY button.
 * When you paste it in PowerShell, it will show:
 * test3
    test2 test1
 * PowerShell paste: [https://i.imgur.com/MTV5RPt.png](https://i.imgur.com/MTV5RPt.png)
 * But when you paste it in notepad or visual studio code, it shows it as expected:
 * test1
    test2 test3
 * Notepad paste: [https://i.imgur.com/esLxCpC.png](https://i.imgur.com/esLxCpC.png)
 * Thanks
 * It’s happening since V3.0.
 * Updated post with pictures to make it a bit easier to understand.
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15274129)
 * Okay so walk me thru the steps to replicate the issue, so I can follow along 
   on default WordPress install and try to help. Please be specific, let me know
   which library you are using, block or classic editor, any specific settings, 
   etc. Also I don’t have Windows/Powershell.
 *  Thread Starter [worldsdream](https://wordpress.org/support/users/worldsdream/)
 * (@worldsdream)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15274136)
 * [@specialk](https://wordpress.org/support/users/specialk/) I updated the post
   with screenshots. I only use Gutenberg.
 * This only happens when you click the COPY button. When you select the text, everything
   works fine when pasting in PowerShell.
 * Did that help you?
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15274148)
 * Yes that will be useful as I follow along with the steps. Please let me know 
   how to repeat the issue on default WP.
 *  Thread Starter [worldsdream](https://wordpress.org/support/users/worldsdream/)
 * (@worldsdream)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15274196)
 * I updated the post.
 * What I am thinking is: Did this maybe happen because the copy button is changed?
 * From:
 * [https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js](https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js)
 * To:
 * prismatic/lib/prism/js/plugin-copy-clipboard.js
 * More information: [https://wordpress.org/support/topic/plugin-copy-clipboard-loading-from-external-cloudflare/](https://wordpress.org/support/topic/plugin-copy-clipboard-loading-from-external-cloudflare/)
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15274213)
 * I will try to get there based on your steps. Btw is this for Prism.js or Highlight.
   js?
 * “Did this maybe happen because the copy button is changed?”
 * No the change mentioned in that other thread was not implemented in the latest
   version.
 *  Thread Starter [worldsdream](https://wordpress.org/support/users/worldsdream/)
 * (@worldsdream)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15274222)
 * It’s on Prism.js.
 * I can see that it’s not using cloudflare anymore and the code in prismatic/lib/
   prism/js/plugin-copy-clipboard.js is differently than the code in [https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js](https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js).
 * So that change that is mentioned is not added to v3.0. But, something else changed
   to the plugin-copy-clipboard.js compared with pre v3.0.
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15275162)
 * For Prism.js, all plugin scripts were updated to the latest versions. So yes 
   the Clipboard plugin was updated, but it has nothing to do with the issue reported
   in that other thread.
 *  Thread Starter [worldsdream](https://wordpress.org/support/users/worldsdream/)
 * (@worldsdream)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15275294)
 * Ok!
 * So the latest prismjs is causing that issue you think?
 * If so, I can test it out without prismatic plugin and see if that works.
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15275300)
 * Yes that would be super useful, worldsdream.
 *  Thread Starter [worldsdream](https://wordpress.org/support/users/worldsdream/)
 * (@worldsdream)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15275495)
 * I added the latest prismjs manually and I can tell that it’s prismjs issue. They
   changed something in the latest release which is having these copy-paste issues!
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15277601)
 * Thank you for testing it worldsdream, really saves me some time and is appreciated.
   I noticed you already reported the bug to the Prism.js team, hopefully they can
   get it fixed up soon. Once it is fixed, it will be added to the next version 
   of Prismatic. Thanks again for your help, and feel free to post again with any
   further infos, feedback, etc.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Copy button shows code upside down when paste’ is closed to new replies.

 * ![](https://ps.w.org/prismatic/assets/icon-256x256.png?rev=1521267)
 * [Prismatic](https://wordpress.org/plugins/prismatic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/prismatic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/prismatic/)
 * [Active Topics](https://wordpress.org/support/plugin/prismatic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/prismatic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/prismatic/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/copy-button-shows-code-upside-down-when-paste/#post-15277601)
 * Status: resolved