Extend textarea element with same functionality as input element