So I’m trying to create some custom blocks.
And I’ve got a simple select field within the blueprint.
Following that I’ve been trying to work out how to make it visible in a WYSIWYG editor.
My blueprint for the button
name: Button
icon: bolt
fields:
linktype:
label: Linktyp
type: select
width: 1/4
options:
normal: Normal
mailto: E-Mail
tel: Telefon
default: normal
link:
width: 3/4
label: Link
type: text
text:
label: Text
type: text
I’ve tried doing it like this in my Button.vue
<select name="linktype"
@input="update({ linktype: $event.target.value })">
<option
:value="content.linktype.mailto">E-Mail</option>
<option
:value="content.linktype.tel">Telefon</option>
<option
:value="content.linktype.normal">Normal</option>
</select>
But this isn’t doing anything it seems.
instead of update
I also tried using onChange
but the result of that was the following error message
_vm.onChange is not a function
Can you guys help me?