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