Forum Discussion
alex-franco
Jun 22, 2021Brass Contributor
OneNote - Inserting Code Blocks
Are there any plans for a way to format code blocks in OneNote without inserting a 1 column/row table or an ugly print out? The most relevant Google search brings up a post from 2018 where the top an...
WOS-MAnthony
Mar 15, 2024Copper Contributor
nclinch, check this out:
Mac: Format > Styles > Code
Windows: Ribbon > Styles > Code
It's not perfect but it does seemingly remove unnecessary formatting and allow you to paste in and format code blocks.
JediSQL47
Mar 15, 2024Copper Contributor
Thank you. That does work for a quick and dirty. We'll still need to do the via-Word method if we want to retain the syntax color highlighting. Also, Styles > Code is a paragraph style, so you can't style just a few words within a sentence. I tried via-Word for inline code, and it doesn't work well either.
- WOS-MAnthonyMar 15, 2024Copper Contributor
100% agreed that's it's limited, but it's something. It's a glaring feature absence from OneNote that's borderline inexcusable for a note taking app at this point.