[Resolved] Need script for Syntax Highlighter

Home Forums Support [Resolved] Need script for Syntax Highlighter

Home Forums Support Need script for Syntax Highlighter

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1197945
    Shubham

    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

    #1198160
    David
    Staff
    Customer Support

    Hi there,

    best to use a plugin – there are plenty of other supported options.
    One of our users recommended this:

    https://wordpress.org/plugins/code-syntax-block/

    And this come up a couple of times:

    https://wordpress.org/plugins/enlighter/

    Both still up to date and well supported

    #1198175
    Shubham

    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.

    #1198272
    David
    Staff
    Customer Support

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.