I think you would have to extend or override the display plugin. That is configured in the editor:template of the namespace of the document. This would also likely break in some future update, which adds a maintenance burden to your project. You could file a feature request, possibly with a contribution of actual code, but I can’t guarantee this would be picked up or, even if it is picked up, if it would be released in a reasonable time frame for you.
Thank you for your reply Jasper.
Do I understand correctly that you imply changing the plugin.class property of a frontend:plugin node to a custom class? Is this documented anywhere?
This isn’t documented afaik since it isn’t really intended as an extension point. However, these are just wicket classes so it is entirely feasible to customize them if desired. The problem is that we may change the UI which could break your code. Or sometimes we update the wicket version. Adding JS to do this faces the same issues really.
Your best bet for future compatibility is to get this as a new feature in the product, but I doubt something like that would get high priority at this moment. However, this is your best route to get a future proof solution.