Create a function textex that will be registered as an action.

When the action is called, build a dad dialog called "textex". Make sure there's only one instance of the dialog is created by checking if a dialog by this name already exists.

The dialog features a text editor widget that tries to fill all available space but allows scrolling if text content is still larger.

On any text input, the text is reproduced in the message log to demonstrate the on-change event.

A row of buttons is also provided to demonstrate further subcommands on text widgets.

More details on DAD: DAD developer's doc