Extend Panel to copy the rendered template to clipboard

Hi Kirby-Folks,

Iā€™m evaluating if we can use Kirby for a clients usecase. One rather specific requirement is a feature to copy the generated HTML of rendered template into the clipboard (donā€™t askā€¦ ).

Iā€™ve never done anything in kirby, but as far as unterstand Iā€™d need to solve this via a new plugin.

I have a proof of integration (outside of kirby) which uses ClipboardJS to copy HTML from a textarea. Now if itā€™s feasible to

  • add a (hidden) textarea in the panel which contains the rendered-templates-html
  • and a custom ā€œcopyā€ button which triggers ClipboardJS

I believe that this can be done. Iā€™d appreciate any thoughts on how to approach this and if itā€™s doable.

Thanks a lot, Fabian