Introducing Quests: Tailored gamification & bridging in-person events with your community Mike Gitkos Yesterday at 12:39 PM1 day
Posted August 25, 20186 yr 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?
August 27, 20186 yr 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.