开发者

Script for the functionality of Code Sample

开发者 https://www.devze.com 2023-01-30 20:25 出处:网络
I just want to have the functionality of Code Sample(this is a button above text format box in SOF when we ask a question) which is also there in StackOverFlow. How to get the color of keywords which

I just want to have the functionality of Code Sample(this is a button above text format box in SOF when we ask a question) which is also there in StackOverFlow. How to get the color of keywords which are shown in IDE. <pre><code> works good to show the code but how to display the exact color which IDE is displaying, that is what I don't know. Can we have开发者_JAVA百科 same functionality in Windows form to display the code.


You might want something like this: http://code.google.com/p/syntaxhighlighter/

If you're using jQuery, then: http://code.google.com/p/jquery-chili-js/


I think you are asking for a code syntax highlighting tool in - if so check out

  1. http://alexgorbatchev.com/SyntaxHighlighter/
  2. http://colorcode.codeplex.com/

You did not specify a language though.


StackOverflow uses Google Prettify according to this post: https://meta.stackexchange.com/questions/14664/how-does-so-syntax-highlight-citations-so-well

0

精彩评论

暂无评论...
验证码 换一张
取 消