Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
    
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. –  Colin Bowern Mar 10 '11 at 15:47
add comment

2 Answers

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.

share|improve this answer
    
I'm getting closer - I'm now trying to wrap everything into a custom ribbon button and solution package. –  Colin Bowern Jan 27 '11 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 '11 at 19:25
add comment

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/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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