Has anyone been able to get a package like SyntaxHighlighter to work with SharePoint wikis?

  • I've got it partially working; exposed a flaw in the wiki's handling of the pre element under Firefox. Escalated to PSS for a fix. Mar 10, 2011 at 15:47

3 Answers 3


Not with wikis (haven't tried) but I did get it to work with a Blog site.

Just a matter of putting the javascript packages into a document library and referencing them within a content editor web part. Had to edit the HTML for a blog post that had code in, right enough.

  • I'm getting closer - I'm now trying to wrap everything into a custom ribbon button and solution package. Jan 27, 2011 at 18:47
  • Cool, I never got that far - only just did a proof of concept. Suppose you could have a Ribbon Button toolbar that woudl switch on/off a user control that spits out the required javascript.
    – James Love
    Jan 27, 2011 at 19:25

I created a syntax highlighter for SharePoint Wiki you will find the code here: http://code.msdn.microsoft.com/SharePoint-Syntax-ac532d71

About the backgrounds you will find my blog post here: http://www.n8d.at/blog/use-syntax-highlighter-in-sharepoint-rich-text-editor/


If you're the site owner, you can edit the master page to load the required javascript on all your pages.

I've made a blog post about it where I do a step-by-step (also makes formulas work with MathJax, enables redirects and a basic version of templates). But basically you go to Site settings, open the master pages library, click the button to open it in Explorer, download the file seattle.master and add the required scripts in the section (and re-upload of course). Then they're called and ready on all your wiki pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.