I am using wysiwyg: true
to suppress the drawer when adding a new block, which works well, but I have to click into the block to start editing. Is there a way in set the focus to my field ?
This is my custom block plugin index.js:
panel.plugin("re/txt", {
blocks: {
txt: {
computed: {
textField() {
return this.field("txt");
},
},
template: `
<template>
<k-writer
ref="txt"
:inline="textField.inline"
:marks="textField.marks"
:nodes="textField.nodes"
:value="content.txt"
:placeholder="textField.placeholder"
class="k-writer k-block-type-text-input"
@input="update({ txt: $event })"
/>
</div>
</template>
`,
},
},
});