We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Syntax Highlighter with prims js

  • #440
    Avatar photo[anonymous]

    Hi Bob,

    I am trying to use Prism js in theme. I am following this docs:

    As suggested in the doc, I downloaded js and css files and put that in the respective folders.


    `        {{/checkIf}}`
    `      `
    `       {{{@headCustomCode}}}`
    `    `
    `    `
    `        {{{@bodyCustomCode}}}`

    and in footer.hbs

    `{{#if @renderer.previewMode}}`

    Could you please help me out here.



    Avatar photoBob

    Hi Ajjet,

    Just follow the instructions, everything is described in detail

    Your example does not contain the prism.js file, this one must be added to the footer section.  To have a popup with a list of coding languages you have to add them to the config.json file.

    The” dark layout” was created by me and is available and delivered only with the following themes: Documentation and ProDocs.

    Avatar photo[anonymous]


    I did add the code in footer, pasted it wrongly.

    View post on

    View post on

    I did not add the languages in the config file. I have added now

    View post on

    But the pop is still not there.

    View post on

    AM I missing something ????



    Avatar photoBob

    Use FORMATS select, not the Code.


    Avatar photo[anonymous]

    Yes, I added the labels at the wrong place in config file. I had to add under  here :

    “customElements”: [ ]
    It works.
    Thanks so much