[Vuejs]-How to set autofocus on Vue froala component

0👍

config: {
      autofocus: true
  }

works for me

0👍

Try something like this:

<froala
            v-model="note"
            :tag="'textarea'"
            :config="config"
            ref="froalaFocus"
          >
          </froala>
    ...
    this.$refs.froalaFocus.focus()

you may need to use the $ellike so: this.$refs.froalaFocus.$el.focus() possibly dig a bit deeper (your ref could be an array in which case you need tofind the element you want to focus on.

Leave a comment