Currently, I am utilizing the vue-textarea-autosize plugin for a textarea with automatic resizing functionality as more content is added.
An issue arises when the user presses enter, resulting in a new line being created. My objective is to have pressing enter trigger 'process this' and call an event handler instead.
I attempted to set @keydown.enter.exact.prevent
and
@keyup.enter.exact = processCommand()
on the element:
<textarea-autosize
@keydown.enter.exact.prevent
@keyup.enter.exact = processCommand
/>
The challenge lies in the inability to access the DOM textarea
directly since it is nestled within textarea-autosize
. Switching back to a regular textarea resolves the issue.
Is there a workaround available for this predicament, or perhaps a method to expose the dom element from within the component?