Ideally the component would render in the edit mode toolbar if in edit more or in the preview toolbar if in split or preview mode.
Implementing this right now (entwine based CMS) without hacks could be tricky, so I'm logging this for now as an enhancement for SilverStripe 5.x or a time where the CMS/toolbar is more React driven.
It may also be more achievable when https://github.com/silverstripe/silverstripe-admin/issues/480 has been implemented into core, since it comes with (public) redux state tracking of the mode which could be used easily enough to help with this too.
Subtasked out from https://github.com/silverstripe/silverstripe-sharedraftcontent/issues/78
Ideally the component would render in the edit mode toolbar if in edit more or in the preview toolbar if in split or preview mode.
Implementing this right now (entwine based CMS) without hacks could be tricky, so I'm logging this for now as an enhancement for SilverStripe 5.x or a time where the CMS/toolbar is more React driven.
It may also be more achievable when https://github.com/silverstripe/silverstripe-admin/issues/480 has been implemented into core, since it comes with (public) redux state tracking of the mode which could be used easily enough to help with this too.