EnlighterJS / Plugin.WordPress

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

Impossible to add a custom class #285

Closed wpdiaries closed 3 years ago

wpdiaries commented 3 years ago

In the Gutenberg editor in the right panel, normally you can add a custom class to a block. It is done in the Advanced section. But if you add such a class to an Enlighter block, it does get transferred to the outer div formed with JavaScript. So customization of some particular blocks gets impossible.

E.g. I am trying to remove hover buttons for a few blocks only (1 or 2 line blocks). If I could add a custom class to the .enlighter-default div (as it is possible for some other code highlighting plugins), it would be very helpful.

Could you add transferring custom classes from the Advanced section of the block properties in Gutenberg to the outer Enlighter div at the front end, please?

AndiDittrich commented 3 years ago

see Enlighter -> Options -> Advanced -> Retain css classes

AndiDittrich commented 3 years ago

btw. the recommend method is to use custom themes - this is much more reliable

wpdiaries commented 3 years ago

Thank you very much! Works perfectly. I am sorry, I had to explore all the options before asking silly questions of course. Thanks!!!