Search code examples
phpjquerytinymcecodehighlighter

tinymce code highlighting just like stackoverflow?


im using tinymce for my text editor, i wanted a code highlighting feature for one of the buttons on the toolbar, but i wanted a simple one like the one stackoverflow uses, deos anybody know of anything out there, or deos tinymce have something like this build in :)) thanks for the support!

p.s. im using the jquery tinymce


Solution

  • Stackoverflow uses the markup language Markdown. Server-side it's "rendered" by MarkdownSharp (C# implementation, but there are PHP ports as well). The client-side text editor is WMD.

    Syntax highlighting is done using code-prettify.

    See https://meta.stackexchange.com/questions/10369/which-tools-and-technologies-build-the-stack-exchange-network.

    You probably won't be able to easily fold this into TinyMCE. You're either using Markdown, or a WYSIWYG text editor. Both at the same time is a contradiction.