Forum Discussion
OneNote - Inserting Code Blocks
Thank you for the update. I can confirm the Loop component in the web version and that they cannot be added via the desktop version. When I add via web, and then view the page with the desktop app, I get this:
- MsStormyHowlsJan 12, 2025Copper Contributor
Hello, It's Jan 2025. This Loop Component works in the desktop version.
I don't really like it though just because it's over-engineered when I just want to get the spell checker to not go crazy over the syntax. The blocks they have in Discord for code is what I'm looking for. I can see this being useful for saving small complete scripts rather than the learning/note-jotting I'm doing that doesn't need to be saved separately to the cloud.
- CameronOveAug 08, 2024Copper Contributor
If you are in OneNote desktop version you can insert loop components/<code>. When you do it will go through a process of creating the component - it looks like it creates it then a message will appear in the component:
One more step to create this loop component. This component will be shared with everyone in your organization who has access to this page. If the component's content should not be shared broadly, display as link instead; only people with permission for the link will be able to view the component.
[Insert and share] [Display as link]
If you click on the [Insert and share] button it will insert the component into the note and you can then use it in the note.- CameronOveAug 08, 2024Copper ContributorIdeally it would be good if MS would just give us that component (it looks like the same component you get when you ``` in Teams). Why not just put it in OneNote. However, this is the best solution I've found that does not require the installation of additional software.