EnlighterJS / Plugin.WordPress

:package: Official WordPress Plugin of EnlighterJS
http://wordpress.org/plugins/enlighter/
GNU General Public License v2.0
118 stars 17 forks source link

An issue about customized CSS Selector in Ver4.2 #288

Closed cokemine closed 4 years ago

cokemine commented 4 years ago

Hello, Since I used "Crayon Syntax Highlighter" as my Highlighting plugin which is no longer support, I changed it to Enlighter. Here are my settings CSS block selector: pre.EnlighterJSRAW, pre[class*="lang:"][class~="decode:true"] CSS inline selector: code.EnlighterJSRAW, span[class*="lang:"][class~="decode:true"][class~="crayon-inline"] It works very well in version 3.11,but when it updates it to 4.2,It has a problem. Snipaste_2020-07-19_18-46-35 So I found this: In the Ver3.11 3 In the Ver4.2 2 I think """ are replaced to "&quot" in HTML so that JS can not work right. I would really appreciate it if you can give me a solution. Thank you.

AndiDittrich commented 4 years ago

Hi @CokeMine ,

in case you need special selectors you have to add a custom EnlighterJS init code to your page and disable the default one.

AndiDittrich commented 4 years ago

btw. did you've tried the crayon compatibility mode ? it converts everything on the fly

cokemine commented 4 years ago

@AndiDittrich Hi, The compatibility mode works well.Thank you!