editable.js
editable.js copied to clipboard
Feature: Prevent user from typing in input at max value
Is it possible to prevent typing conditionally? I'd like to implement a max-length feature of textarea element using editable.js.
No, that's not possible at the moment.
You could try setting up a beforeinput event handler on the dom element.
That one bubbles up and is cancelable.
But what we're usually doing is to extract the length and then show some warning if the value is above the limit. This results in a better behavior as it won't just cut off characters and also works the with copy/paste of text. Controlling the user input is too complicated most times.
