@kanety/jquery-insert-text

0.2.0 • Public • Published

jquery-insert-text

Insert text to input or editable element.

Dependencies

  • jquery

Installation

Install from npm:

$ npm install @kanety/jquery-insert-text --save

Usage

Insert text at caret position of <textarea> or contenteditable elements:

<textarea>sample text</textarea>
<div contenteditable="true">sample text</div>
$('textarea').insertText('YOUR TEXT');
$('div[contenteditable]').insertText('YOUR TEXT');

Options

Insert text at first position:

$('textarea').insertText('YOUR TEXT', 'first');

Insert text at last position:

$('textarea').insertText('YOUR TEXT', 'last');

License

The library is available as open source under the terms of the MIT License.

Package Sidebar

Install

npm i @kanety/jquery-insert-text

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

17.8 kB

Total Files

13

Last publish

Collaborators

  • kanety