My Wysiwyg Linebreaks module was working as of 8.x-alpha3—when a user visited admin/config/content/formats/manage/basic_html with a standard profile install, the user would see a 'Conversion Method' configuration form in the 'CKEditor plugin settings' area, regardless of what buttons were enabled.

Now, however, the Conversion Method form/vertical tab is always hidden, no matter what the value returned by isEnabled() (the markup is present, but it is set to display:none). The only way to get the configuration form to display is to add a button (which is really annoying, because it would have to be a non-functional 'dummy' button).

Conversion Method missing on Editor configuration form

I was under the impression that CKEditorPluginContextualInterface::isEnabled was supposed to allow plugins to display configuration forms with or without buttons, and indeed, that was the case up until sometime in the past couple of months.

Comments

geerlingguy’s picture

In my debugging, it looks like CKEditorPluginManager::getEnabledPluginFiles() is working correctly, at least—setting isEnabled() to TRUE and isInternal() to FALSE correctly adds linebreaks to the $additional_plugins array returned by getEnabledPluginFiles().

Still looking...

geerlingguy’s picture

Status: Active » Needs review
StatusFileSize
new1.31 KB

Attached patch fixes this problem—the CKEditor admin JS was not checking whether a settings form was for a button or not.

wim leers’s picture

Title: Editor Plugin settings not showing when isEnabled is set to TRUE » CKEditor Plugin settings vertical tab not showing when isEnabled() is set to TRUE
Issue tags: +sprint, +Spark
StatusFileSize
new910 bytes

Darn — sorry :( I broke this in #2089631: Showing/hiding of CKEditor plugin settings is fragile, automate it (breaks in narrow viewports and when enabling CKEditor), which actually makes things a lot better for most CKEditor plugins out there, but clearly the code is not specific enough. (I really wish we had JS tests!)

However, I think the solution can be even simpler than your patch :)

Thanks for the report and patch!

geerlingguy’s picture

Status: Needs review » Reviewed & tested by the community

Yep - this looks perfect to me! (Pre-emptively set to RTBC—the tests will pass).

wim leers’s picture

Great :)

wim leers’s picture

webchick’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

wim leers’s picture

Issue tags: -sprint +CKEditor in core
nod_’s picture

Issue tags: +JavaScript

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.