OneNote Gem Add-Ins

UWP: How to Copy Code from PowerShell ISE to OneNote and Maintain Syntax Highlighting?

Gem Menu for OneNote UWP provides the ability to paste rich text to OneNote for Windows 10.

In many cases, OneNote will remove text format when you copied and pasted text , including: text color, background color, some space are removed.

And these text formats are not in HTML format, they may be rich text format.
Lead to the original formatted text, beyond recognition.
 
Here's an example with the PowerShell ISE that comes with Windows.
{C}
Copy Code Highlighted with Syntax from PowerShell ISE 
We copy the code in the PowerShell ISE that comes with Windows.
These codes appear to be colored. It is easy to distinguish between variable names and strings.
Copy Code Highlighted with Syntax from PowerShell ISE
 
Code Loses Color After Pasted to OneNote 
In OneNote for Windows 10, press Ctrl + V to paste the PowerShell code and you'll find that all the colors in the code are gone.
Code Loses Color After Pasted to OneNote
 
Use the Paste Rich Text Feature of Gem Menu to Keep the Color of the Code 
To keep the color of your code, you can use the Paste Rich text feature of the Gem Menu.

Click Gem Menu for OneNote UWP -> “Edit” menu -> “Paste Rich Text” menu item.
Use the Paste Rich Text Feature of Gem Menu to Keep the Color of the Code
 
And, the PowerShell code pasted into the OneNote UWP maintains the original syntax highlight color.

The background color will even be preserved.
 
Demonstration
Use Gem Menu’s Paste Rich text feature to paste the code copied from Windows PowerShell ISE to OneNote, and keep the syntax highlighted.
 

Download Gem Menu for OneNote UWP