OneNote Gem Add-Ins

How to Resolve OneNote Lost all Spaces When You Copy Code from Android Studio and Paste to OneNote?

Copy Code from Android Studio

Select a piece of code, and press Ctrl+C copy them to clipboard from Android Studio.
Copy Code from Android Studio
 
Paste the Code to OneNote, It will Lost all Spaces

It is very strange, OneNote will keep the highlight, but lost all spaces when you press Ctrl+V to paste the code to OneNote.
Paste the Code to OneNote, It will Lost all Spaces
 
Using Gem's Paste Feature to Keep the Spaces in Code

You can using the Gem's Paste Rich Text feature to keep the spaces in code in OneNote.

After copy the code from Android Studio, in OneNote, click Gem for OneNote -> "Edit" tab -> "Paste Rich Text" feature. Gem will paste your code to OneNote, it can keep the highlight and spaces.
Using Gem's Paste Feature to Keep the Spaces in Code
 
In addition, there may be some code editors that have similar situations, you can also try this "Paste Rich Text" feature to keep space.
Download Gem for OneNote