Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Displaying code snippets in Sharepoint wiki

Is there a way to get SharePoint to display code snippets in a pre-formatted way?

Currently if you insert any code, it just looks exactly like the rest of the text. Anything would be better than nothing.

like image 997
BoboTheCodeMonkey Avatar asked Dec 29 '08 17:12

BoboTheCodeMonkey


People also ask

How do I use code snippets in SharePoint online?

Go to the page where you want to add the Code snippet web part. If your page is not already in edit mode, click Edit at the top right of the page. Click +, and then select Code snippet from the list of web parts. On the toolbar, select the language, whether you want numbered lines, and a light or dark theme.

How do you show code snippets?

With a code file open in the editor, choose Snippets > Insert Snippet from the right-click menu, then My Code Snippets.

How do I create a snippet in SharePoint?

To insert a snippetIn the upper-right corner of the page, choose the Settings gear, and then choose Design Manager. In Design Manager, in the left navigation pane, choose Edit Master Pages or Edit Page Layouts, depending on what type of file you're editing.


2 Answers

I found hilite.me which produces html styled code which you can insert into a sharpoint wiki.

It supports a number of languages and styles and is an online app.

like image 147
skyfoot Avatar answered Sep 18 '22 05:09

skyfoot


No because MOSS's wiki is just a new page with the word "wiki" attached to the link.

like image 22
branchgabriel Avatar answered Sep 21 '22 05:09

branchgabriel