Ok, with the different implementations I tested, I think the best way of doing this is to have one new plugin parameter to allow switching to the advanced editor (it fixes the case of the modal action), and to add a plugin outlet wrapping every use of the compact editor.
Doing so allows an override of the compact editor and prevents rendering the “advanced form” to be displayed.
Unless there are strong issues with this implementation, i’ll go with it and open a PR soon.
For more info about what I tried:
- two configuration options: “default_editor” and “allow_editor_switch”. I dropped “default_editor” as the goal is to only have one in our case. If anyone is interested into changing the default editor I can work on this later.
- Adding only one plugin outlet in the compact editor, wrapping the form. I dropped this to add the outlet around the usages of the compact editor as it has a behavior that don’t fit the requirement: when outlet model changes the compact editor propagates the changes to the editor, making the whole form to be rebuilt, and losing focus.