Skip to content

RIPm/jquery.insert-at-cursor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jquery.insert-at-cursor

Jquery plugin for insert anything at the cursor position

Usage

<script src="jquery.insert-at-cursor.min.js"></script>

html

<input type="text" value="" id="foo" />

or

<textarea id="foo"></textarea>

or

<div contenteditable="true" id="foo"></div>

javascript

// first tiem to init
$.initCursor('#foo');

// Normal string
$("#foo").insertAtCursor('bar');

// Contenteditable dom
$("#foo").insertAtCursor('<span>bar</span>');
// Contenteditable dom (functions like rich text editors)
$("#foo").insertAtCursor('<span contenteditable="false">bar</span>');

About

A jquery plugin for insert anything at cursor position.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published