Jump to content

Better syntax highlighting?


DamonT

Recommended Posts

Posted

Hi, is there any way to overwrite default syntax highlighting system in post and use something better (like highlight.js) with auto language detection? Can I overwrite default system or it will be better to add new custom button that will put code in code tag's and conifgure highlight.js to highlight all code tag's?

Posted

Overriding the default syntax highlighting would be somewhat challenging because we explicitly call prettify() when content is loaded via AJAX, however for this same reason it would probably be easier and more reliable than trying to implement a new one alongside the default. You would have to load the appropriate javascript file, not load prettify, but create a prettify method that can be called as a sort of proxy to the new highlighting plugin you are using.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...