Documentation is all about ajax load that works independently. To make Crayon Syntax Highlighter work… few codes must be added inside ajax documentation page (inside main theme page) OR you can also create the child theme for your modification.
Please follow below instruction
Step 1:
Open page doc-ajax.php located inside folder “themes/manual/framework/”
Step 2:
Find <script> tag inside page doc-ajax.php, and add below JS code right below the <script> tag
jQuery(document).ready(function() {
/************************************
** COPY ALL THE “crayon.min.js” js code and paste it over here
** you will find js code inside plugin “crayon-syntax-highlighter/js/min/crayon.min.js”
******************************/
});
You can also find crayon syntax highlighter min js code over there:
https://github.com/aramk/crayon-syntax-highlighter/blob/master/js/min/crayon.min.js
The after adding Jquery code the result will look something like this;
jQuery(document).ready(function() {
var jQueryCrayon=jQuery;(function(a){CrayonUtil=new……
…….})})(jQueryCrayon);
});
Step 3:
Find code
“apply_filters(‘the_content’, $post->post_content)”
and replace with
“CrayonWP::highlight($post->post_content)”
The after replacing code the result will look something like this;
<div class=”entry-content clearfix”>’. CrayonWP::highlight($post->post_content).'</div>’
IMPORTANT:
1. Make sure you are using latest manual version.
2. Make sure Crayon Syntax Highlighter WordPress plugin is active, if accidentally or by knowingly, plugin is deleted then the modification will generate error. In such case you have to reverse the process.