Panel two fields in one?

Is it possible to have two fields in one panel field? One field, save two values?

Why you might think? I want two fields that together generate a preview. Javascript cannot be passed between fields as far as I know. Therefor I probably need one field creating two values.

What would you want that field to look like? Out of the box, this is not possible, however, with a custom field you should be able to achieve this? Currently, you could use a structure field or a multi-select, but this would probably not give you what you want?

It’s a text input and a textarea. Both together generates a preview of them both.

I often start from this when creating a new field:

When copy paste some code I got two input boxes, fine. However it’s just one $this->value() as input. Maybe I need to parse the whole content to get them both?