Formatting a code block in One Note

There is a tool available for formatting the code snippet in OneNote — Note Highlight project — https://github.com/elvirbrk/NoteHighlight2016

Well and good; with some added complexity of installing the plugin and so on…

Is there any alternative?

Well, not the code syntax formatting the way the plugin does but a properly indented code with a decent readability — see if that suffices for you.

Step 1

Paste the code into a beautify engine such as, https://beautifier.io/

Beautify the code on the site. Copy this code.

Step 2

Paste the code with Keep Source formatting option:

Step 3

Select the pasted code and go to the Home tab and select the Code style for the selected code. It would look something like this:

The resultant code is readable and understandable.

Have a good day!

--

--

--

Android Dev | Android Hacker

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

AngularJS migration — the roadmap

Creating native Apps for mobile by React Native

How to work Pexels API with javascript

Short tricks of HTML, CSS and JavaScript

Building a Game With TypeScript. Colors and Layers

How Strict Mode works in JavaScript

Styled Components — React Style Magic

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Manish Sharma

Manish Sharma

Android Dev | Android Hacker

More from Medium

Applications of Interpretable ICR for Transparent Automated Adjudication of Write-In Votes — Part I

Detect and Remove Dead Code with Roslyn

The Story…Is The Art: Part II

The Best Performance Cars of Our Time?