Kirby for Voice

Hi there!

We are big fans of Kirby and want to (ab-)use Kirby as a Voice CMS for an Alexa Skill.

All works really well but we need some extension to existing Textareas (only available in the backend):

  • I need a Button above the Textarea
  • Once clicked it will execute a JavaScript
  • This JavaScript should receive the contents of the textarea
  • JavaScript is executed (Text is read to User - “Prelisten”)
  • Thats it. No need to submit or do anything with the textarea value at this point

Is this doable?
I looked at fields and plugins but i found it really php reliant and no examples of JavaScript execution on a Button click.

Thanks a lot for your help!!

A custom section would probably be a solution rather than a field (if it can be independent of the textarea field itself).

There’s always a little bit of PHP involved to create a section, but if you only need the wrapper if you don’t have to pass data between the frontend and backend I guess (not too familiar with Panel stuff).

Ok! That sounds like a plan! Any idea how i can access the field value in the java script code?

No, I haven’t.

@Dominik you can use our newly refactored and documented content store:

You can get any field of your page in any of your section plugins.