I'm following the instructions from this answer:
Copy Notepad++ text with formatting?
The idea is to use the NppExport plug in to keep syntax formatting when you copy/paste from Notepad++ (there are different ways to do it - great answers over there).
Everything works as expected when pasting code into, say, Word 2016. But when pasting into OneNote 2016 it appears to trim CR/LFs. It works if I first paste into Word, then copy/paste from Word to OneNote.
1 picture == 1k words:

Why doesn't it work with OneNote and what can I do about it?
I could not find any straightforward solution, but it is possible to copy formatted code to MS Word and copy from Word to OneNote.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With