Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter marksei

    (@marksei)

    Sorry, I missed the v4 tag on Github. What I expected (as with Crayon) was that any pre tag would be recognized by Enlighter as code (without the EnlighterJSRaw class). When thinking about that default behavior, it maybe is a bit excessive to highlight any pre tag without further labeling. So, if I were to remove the EnlighterJSRaw in the CSS selector field, Enlighter would highlight any pre tag, have I got it right?

    Nevertheless, you have already solved my current issue, what I was suggesting is to implement a more Crayon-ish behavior, which may or may not be a good thing.

    For the time being I can continue to use the snippet you provided and create any subsequent pre tag using the visual editor. This effectively is a nice way to transition from Crayon, thus my issue is solved. Thank you for your help.

    Thread Starter marksei

    (@marksei)

    Hello Andi, thank you for your prompt response and solution, I guessed that the problem lied in Crayon syntax, however I can’t seem to be able to make Enlighter recognize pre tags (without Crayon syntax) anyway. I tried manually removing the class from pre tag. This is probably due to the fact that Crayon creates pre tags without code tags and the regex used in your code only recognizes that pattern.
    I do believe this is a major feature that could potentially draw in much of the Crayon’s userbase. Not saying that Crayon is a bad plugin, but it hasn’t been maintained for quite some time now and Gutenberg doesn’t really play well with it. I also believe this feature should be implemented within the plugin rather than using a hook and should be enabled by default (a block created by Crayon is unmistakably a code block that needs highlighting).

    Thread Starter marksei

    (@marksei)

    Unfortunately I have no means to troubleshoot this further, anyhow I am running PHP7 so I doubt this had anything to do with your update.

Viewing 3 replies - 1 through 3 (of 3 total)