chmln/vue-wysiwyg

Submit on keydown.enter

Opened this issue · 0 comments

Is it possible to change the behaviour of the input area;

On enter submit, on shift+enter insert a new line.

I have tried using @keydown.native="handleSubmit" but it's acting strange. It's submitting before the given model changed.

Any idea?

Note: Enter is working with e.preventDefault() but the problem is still remains; bind v-model is not changing immediately on keypress. I have even tried with nextTick but does not help. I do not want to wait with timeout or something.