I'm looking for a good syntax highlighter for my site that uses PHP & MySQL and Jquery. A syntax highlighter that does not let the code overlap but allows the user to scroll like here on stackoverflow.
Absolutely all PHP source code highlighters based on Geshi library http://qbnz.com/highlighter/
You can make code blocks "not let the code overlap but allows the user to scroll" by adding CSS overflow : auto;
Also good way is to use JavaScript based code highlighters that highlight code on client side http://alexgorbatchev.com/SyntaxHighlighter/ or http://softwaremaniacs.org/soft/highlight/en/
The scrolling is just a CSS property of whatever the code is in - something like...
max-height: 600px;
overflow: auto;
(The overflow attribute tells the browser to use scrollbars, the max-height tells it at what point the vertical scrollbar should kick in.)
As for hilighting, take a look at google-code-prettify.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With