• When I’m editing a post, codemirror blocks is properly highlighting the syntax for me, and in real-time too, very impressive.

    However when I preview or publish a post, all the syntax highlighting is gone and it’s just a regular < pre > section. I inspected it with chrome dev tools and see the data-element appears to be set properly, and the codemirror class is there, but the code isn’t highlighting/displaying like it does when I’m editing the post.

    • This topic was modified 4 years, 10 months ago by amallard1.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Vicky Agravat

    (@vickyagravat)

    Hello @amallard1

    I have checked the link given by you.
    I got error

    Uncaught ReferenceError: lazySizes is not defined
        at (index):420

    You can check that error on chrome dev tools Console tab.

    It comes from wp-smushit plugin, please try to deactivate that plugin, and test the code block.

    If you still got the problem try to clear cache, if you use any caching plugin.

    You can also try deactivate other plugins one by one and test code block.

    Give last try with default WordPress themes like (twenty twenty, twenty nineteen)

    Hope you’l get solution, with these steps.

    If you found any other plugin that conflict with CodeMirror Block, please give that plugin name. So i can fix those issue.

    Thank you.

    Thread Starter amallard1

    (@amallard1)

    I have deactivated every plugin I have on the website (except CodeMirror Blocks of course) and it is still not working. I have cleared cache and even retried updating the post and code and still is not working.

    I will try the plugin on another website I have to see if it’s the theme, as I really don’t want to remove the theme right now to test the plugin. If it’s not compatible with the theme, I may end up trying a different plugin instead of a different theme.

    UPDATE:
    Yes it works perfect on a different website I have with a different theme. What a shame, such a beautiful plugin!

    As note: I’m using the Acabado theme from Income School.
    https://incomeschool.com/acabado/

    Are there any dependencies required, like jQuery or anything?

    • This reply was modified 4 years, 10 months ago by amallard1.
    • This reply was modified 4 years, 10 months ago by amallard1.
    Thread Starter amallard1

    (@amallard1)

    The “page I need help with” link has been removed.

    The plugin seemed to have conflicted with the theme I had, Acabado.
    I have tested the plugin on a different site with the same theme, on a different host with different plugins, and deactivated all plugins on both sites, and experienced the same issue. The only common denominator was the theme. (I have also tested the plugin on a different site on the same host with a different theme and did NOT experience the same issues, ie. the plugin works on other themes but doesn’t seem to work on the Acabado theme).

    I have since switched to a different code syntax highlighter plugin.

    Again, the conflicting theme is the Acabado theme from Income School.
    https://incomeschool.com/acabado/

    • This reply was modified 4 years, 10 months ago by amallard1.
    Plugin Author Vicky Agravat

    (@vickyagravat)

    Hello @amallard1

    Thank you for your given Information.
    I am glad to know that it is not plugin issue.
    It is just not compatible with your theme.

    I will find the compatibility issue with theme acabado, if possible.

    Thank you.

    I have similar issue. It is not highlighting on posts list page https://guoyunhe.me/blog/ but highlighting on single post page https://guoyunhe.me/2020/02/05/web-embedded-font-format/

    Another issue is that I cannot copy and paste code in WordPress editor.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Not highlighting on post page but highlighting on edit page’ is closed to new replies.