Custom text field with syntax highlighting for c# in a sharepoint list
i need a text field in a sharepoint 2007 list that displays C# code with syntax highlight开发者_StackOverflow中文版ing.
Do i have to develop it on my own or knows somebody a control that meets my needs?
Thanks a lot
An alternative for you is to use the javascript SyntaxHighligher library that can highlight just about every language on earth.
You would have to create your own custom control to render the field and output the javascript necessary to call the SyntaxHighlighter libraries.
http://sharepointmagazine.net/technical/development/customizing-the-user-experience-of-sharepoint-custom-fields-deep-dive-part-5-of-6
http://msdn.microsoft.com/en-us/library/bb684919(office.12).aspx
http://vspug.com/nicksevens/2007/08/31/create-custom-field-types-for-sharepoint/
I think you'll have to create one. This control seems right for the job: http://www.actiprosoftware.com/Products/DotNet/ASPNET/CodeHighlighter/Default.aspx
精彩评论