0.1.2 • Published 5 years ago

vue-functional-textarea v0.1.2

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

vue-functional-textarea

Wrapper component of textarea that provide you with useful functions.

Demo

Demo and Usage

Install

$ npm i vue-functional-textarea --save
# or
$ yarn add vue-functional-textarea

Methods

NameArgumentsReturnDescription
getSelectionStartNumberGet position of selection start.
getSelectionEndNumberGet position of selection end.
getSelectionRange{ start: Number, end: Number }Get range of selection.
getSelectedTextStringGet selected text.
moveCursorNumberMove cursot to position.
insertStringInsert text to cursor. Overwrite if any text selected.
surroundleft: String, right: String (Optional)Surround text by left and right. Use left as right if right is no specified.
setSelectionRangestart: Number, end: Number, diration: StringSee HTMLInputElement.setSelectionRange()
selectSee HTMLInputElement.select()

License

MIT