You are here
How Should BUEditor Plus Handle Visibility?
One of the modules I released this year and one that has been gaining popularity is BUEditor Plus. BUEditor Plus works with the very popular BUEditor to give better control over editor control. It allows you to have editors set per input format and the editor changes on the fly when you change your input format.
One of the biggest problems and points of confusion is the visibility settings in BUEditor. You can set BUEditor to appear on certain paths and then exclude from specified editor ids. Currently BUEditor Plus obeys these rules and that does lead to some confusion (see this issue as an example).
When I set out to write BUEditor Plus the idea was that the editor should only show on text fields that have formats attached. This makes sense as you don't want unfiltered HTML going into textareas, so an unfiltered textarea doesn't need an editor. I still believe in this theory today.
Currently we have two scenarios in which BUEditor is used:
- On filtered textarea fields in entities.
- On filtered textarea fields in non-entities (ie: custom blocks).
The first scenario is really simple. You set the profile in the field's settings page and you got it, so long as BUEditor's visibility settings match.
The second scenario is more complex. Currently in the 7.x-1.x-dev branch if the field isn't part of an entity, then the global profile is used, again honoring BUEditor's visibility settings. This works out fine, but it would be nice to have more control.
What I am currently considering is the following (see this issue):
Make profiles weighted.
Remove the 'global' profile setting.
Add an "ignore paths" visibility setting to each profile.
What this would do for non-entities is loop through each profile in order. If that path isn't ignored in the profile settings, then it will be used. If it is ignored, the next profile is checked until we reach the end. If nothing matches, then BUEditor isn't displayed.
With this change, BUEditor's visibility settings would be ignored (set #access to false on the fields and display a notice that the settings are handled by BUEditor Plus). The ability to hide the editor on a per ID basis would also be removed (this really seems like it would only be used on a fringe case given the new granular control).
I would like to get this issue settled before moving onto the 2.x branch, which includes better integration with WYSIWYG. I would appreciate any thoughts or concerns, or even better solutions, for this problem. Please either comment here or on the issue, "CONSIDERATION: Ignore BUEditor's Visibility Settings.". If possible I would like to move forward with this in October, so please take a moment to let me know what you think. Thanks!