Skip to content

A JavaScript library for manipulating cursor inside textareas and contenteditable html elements.

License

Notifications You must be signed in to change notification settings

sujeet/libcursor

Repository files navigation

libcursor

Build Status Code Climate Test Coverage

libcursor is a JavaScript library for manipulating cursor inside textareas and contenteditable html elements.

Using libcursor (Full API docs)

Include the library:
<script 
   type='text/javascript' 
   src='//sujeet.github.io/libcursor/libcursor.js'>
</script>
Here is a sample piece of code:
/**
 * Write "Hello world!" with cursor 
 * ending up just after the 'o' in 'Hello' 
 */
Cursor
  .current()
  .insert("world!")
  .moveBackward(6)
  .insert("Hello")
  .insertAfter(" ");

About

A JavaScript library for manipulating cursor inside textareas and contenteditable html elements.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published