Is your feature request related to a problem? Please describe.
I am writing an Editor xtd plugin for the TinyMCE editor to integrate into Joomla 4. The custom plugin is context sensitive and I would like to disable/change the state of my button. Currently the TinyMCE editor plugin in Joomla only allows you to register an "onclick" callback. The TinyMCE library allows you to register a callback on the onpostrender property where you can register listeners to change the state of your button.
TinyMCE documentation for onpostrender can be found here: https://www.tinymce.com/docs/advanced/creating-a-custom-button/#conditionallydisablebutton
Describe the solution you'd like
Simplest solution - Update the TinyMCE editor plugin to allow an "onpostrender" callback and any of the other button options that may have been missed: https://www.tinymce.com/docs/advanced/creating-a-custom-button/#buttonoptions
The Better Solution - Include a way (maybe through a layout?) to modify the final script that gets generated in Joomla script options for plg_editors_tinymce. This will allow more control via 3rd party plugins to extend the editor.
Additional context
This will allow for similar functionality to the link button in the editor. Clicking a link element in the wysiwyg editor will toggle the link button into an "active" state.
PRs are welcome