Problem/Motivation
This is a follow-up to #2994702: Allow editors to alter embed-specific metadata, as well as `data-align` and `data-caption`.
Right now there is no way for a user to set the view mode without the 'source' button enabled in the CKEditor. Right now, one must
1) Press source.
2) Edit the view mode manually.
3) Press source again to re-enable the CKEditor WYSIWYG to view the new view mode.
We should allow selecting the view mode in the EditorMediaDialog, with possibly a select list, or possible radio buttons.
We should also allow a configuration for limiting the allowed view modes, but I think there may be a separate issue for that.
Phenaproxima writes:
[We should have a] separate issue to discuss exposing the available view modes as a set of checkboxes, and allowing the user to choose which one to use per-embed if more than one view mode is enabled. For MVP purposes, though, having this in contrib is fine.”
Proposed resolution
1) Allow per bundle configuration for view modes available to select in the EditorMediaDialog
2) Make the feature optional.
3) This should be separate from the media embed filter's default view mode.
Remaining tasks
User interface changes
Config form for view modes
New field in EditorMediaDialog
API changes
New config for drupalmedia ckeditor plugin.
Data model changes
New config for drupalmedia ckeditor plugin.