EnlighterJS / Plugin.Gutenberg

:pencil: Official EnlighterJS Plugin for WordPress Gutenberg Editor
Mozilla Public License 2.0
21 stars 1 forks source link

Gutenberg Beta - Global language setting does not appear to be inherited. #6

Closed Wolf-Byte closed 5 years ago

Wolf-Byte commented 6 years ago

Firstly I would like to say great work on the plugin guys 👍. I know this is a low priority issue in the grand scheme of things but I thought I would raise it on the off chance you are not aware of it.

When using the Gutenberg Beta (Version 3.8-BETA1) the default language does not appear to be inherited.

Replication steps:

  1. Within global settings set the default language to CSS
  2. Create a new block within a blog post
  3. The language will appear as 'Generic Highlighting' under appearance.

screen shot 2018-08-28 at 16 09 49

Like I say this is no biggie and it can easily be worked around in the meantime by manually selecting the language.

AndiDittrich commented 6 years ago

Hi @Wolf-Byte ,

thanks for your feedback. currently this behaviour is intended by design: it is projected to remove the "default language" setting from the plugin page because its not really needed - in the past it sets the "default" highlighting language in case no language attribute was set. Currently every component (TinyMCE/Gutenberg/Quicktags/Shortcode) sets this attribute explicitly.

btw. EnlighterJS.Gutenberg has its own repository :+1:

best regards, Andi

AndiDittrich commented 5 years ago

update: the "default language" setting has been removed in Enlighter v4 - the language parameter has to be set explicitly for each codeblock.

you can change the "default list value" by altering the global language list via the filter enlighter_languages