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

many themes end up with white on white text in editor #307

Closed chriscamacho closed 3 years ago

chriscamacho commented 3 years ago

Forgive me as I don't honestly know for sure if this is directly a bug caused by Enlighter...

I have a dark background with white text on my site.

with afterlight theme this is no issue, however with a great many themes, (that usually assume black on white sigh!) although the posts look just great displaying light grid paper background and dark text (in contrast to the main body text which is white on dark)

however when in the editor the enlighter edit block displays white on white.

I have honestly tried just about every colour setting in both the main theme and a custom enlighter theme.

AndiDittrich commented 3 years ago

Enlighter contains only one editor theme (not related to the Enlighter code themes) - generally your WordPress theme needs a dedicated "Enlighter Block Style" to change the appearance

chriscamacho commented 3 years ago

I don't see any "Enlighter Block Style" in any of the themes I do see white on white text in the post editor block

AndiDittrich commented 3 years ago

you cannot change this within the Enlighter settings. your WordPress theme needs some pieces of CSS within the editor-style to apply "dark mode" to the Enlighter codeblock

chriscamacho commented 3 years ago

I didn't change anything it just changes to white on white when you use many of the new themes

what does "apply dark mode" mode mean specifically what css

AndiDittrich commented 3 years ago

your theme is changing the Enlighter styles...therefore the font-color turns into white...

chriscamacho commented 3 years ago

its not "my" theme its many available through the wordpress

specifically what css is the enlighter using for font-color (ie which ID) is this different from the wp theme font-color, and is a different color used in the post and the block editor ?

On Sat, 17 Oct 2020 at 22:49, Andi Dittrich notifications@github.com wrote:

your theme is changing the Enlighter styles...therefore the font-color turns into white...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EnlighterJS/Plugin.WordPress/issues/307#issuecomment-711084548, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFO4SOOW2OPWPXLI45GSFTSLIGNJANCNFSM4SUQU44A .

--

blog bedroomcoders.co.uk http://bedroomcoders.co.uk

Disclaimer: By sending an email to ANY of my addresses you are agreeing that:

  1. I am by definition, "the intended recipient"

  2. All information in the email is mine to do with as I see fit and make such financial profit, political mileage, or good joke as it lends itself to. In particular, I may quote it where I please.

  3. I may take the contents as representing the views of your company.

  4. This overrides any disclaimer or statement of confidentiality that may be included on your message.

AndiDittrich commented 3 years ago

did you tried the latest Enlighter v4.4-beta ? It also includes some changes to the default Enlighter block styles - it may solve your issue.

The Enlighter.Gutenberg plugin uses some simple css rulesets for codeblock styling: https://github.com/EnlighterJS/Plugin.Gutenberg/blob/master/css/codeblock.less - in the recent Gutenberg releases some classname have changed - this may cause the issue

regarding the "themes" ...everything is different:

chriscamacho commented 3 years ago

I've managed to find a three or four other source code viewers that work ie not white on white, with varying degrees of success, the most successful ones seem to be the ones that extend the "standard" < code > block, the best using server side formatting and no jscript

can I install the beta via the dash or do I need to manually do this (and will it break update notifications in the dash)

is it possible for enlighter to apply its own specific css class to its editor block, that can be explicitly set in the wp site theme "additions" css setting

AndiDittrich commented 3 years ago

you have to upload it manually via ftp/sftp or ssh. update will generally work. you can also wait for the official release.

the "additional css" section cannot be used to change the editor styles - it only affects your theme styles. see WordPress dev docs for further informations

AndiDittrich commented 3 years ago

Enlighter v4.4.0 has been released

chriscamacho commented 3 years ago

the bug has been fixed with this update, thanks