Site logo

Archived topic

Need script for Syntax Highlighter

3 replies · Started by Shubham on March 17, 2020

Viewing posts 1–4 of 4

Hi,

On my website masterincoding.com I have installed GeneratePress premium and I want a script for Syntax Highlighter.

Basically it is a programming courses website So I need to add some code examples.
Please find a screenshot here https://ibb.co/Y7c4cHZ or browse below URLs of my website.

URL: https://www.masterincoding.com/exception-handling-in-java/

I know it can be possible through a plugin that I am currently using but I don't want any dependency in future. Also, Crayon Syntax Highlighter is not PHP 7 compatible. and it was updated last 4 year ago.

Please suggest a script/css that can provide same layout for my code part as shown in https://ibb.co/Y7c4cHZ

Ok. But can't we do with the CSS?

and what if Developer removes their plugin from Wordpress. Is this possible?
Because I am using a lot of code example and there is a lot to do with 3rd party plugin.

Unfortunately its not as simple as dropping some CSS on the site. CSS requires Markup and classes for its styles to be attributed to. That is what these plugins do.

The first plugin i mentioned uses Prism.js: https://prismjs.com
So if you're really concerned about the plugin being abandoned you could implement this yourself. Or alternatively look at using GIST for serving up your code.

But this is all out of our scope.

This archived topic is closed to new replies.