Skip to content

Commit

Permalink
Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
emreerkan committed Jun 5, 2017
1 parent 7dd9dee commit 9d41035
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
7 changes: 6 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ $('textarea').insertAtCaret('Bar');

## Changelog

[1.1.5] - 2017-06-05

* If any text is selected, plugin overrides that selected part of the text with new text

[1.1.4] - 2015-09-22

* Corrected the name of the browser detection variable
Expand Down Expand Up @@ -48,4 +52,5 @@ Licensed under GPLv2 or later.

Contributors:

- [@kittsville](https://github.com/kittsville)
- [@kittsville](https://github.com/kittsville)
- [@Nils-Berghs](https://github.com/Nils-Berghs)
2 changes: 1 addition & 1 deletion insert-at-caret.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"text",
"input"
],
"version": "1.1.4",
"version": "1.1.5",
"author": {
"name": "Emre Erkan",
"url": "http://www.karalamalar.net"
Expand Down
3 changes: 2 additions & 1 deletion jquery.insert-at-caret-vsdoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery insertAtCaret 1.1.4
* jQuery insertAtCaret 1.1.5
* http://www.karalamalar.net/
*
* Copyright (c) 2013 İzzet Emre Erkan
Expand All @@ -8,6 +8,7 @@
*
* Contributors:
* [@kittsville](https://github.com/kittsville)
* [@Nils-Berghs](https://github.com/Nils-Berghs)
*
*/
(function ($, document, window, undefined) {
Expand Down
3 changes: 2 additions & 1 deletion jquery.insert-at-caret.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery insertAtCaret 1.1.4
* jQuery insertAtCaret 1.1.5
* http://www.karalamalar.net/
*
* Copyright (c) 2013 İzzet Emre Erkan
Expand All @@ -8,6 +8,7 @@
*
* Contributors:
* [@kittsville](https://github.com/kittsville)
* [@Nils-Berghs](https://github.com/Nils-Berghs)
*
*/
(function ($, document, window, undefined) {
Expand Down
3 changes: 2 additions & 1 deletion jquery.insert-at-caret.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery insertAtCaret 1.1.4
* jQuery insertAtCaret 1.1.5
* http://www.karalamalar.net/
*
* Copyright (c) 2013 İzzet Emre Erkan
Expand All @@ -8,6 +8,7 @@
*
* Contributors:
* [@kittsville](https://github.com/kittsville)
* [@Nils-Berghs](https://github.com/Nils-Berghs)
*
*/
!function (e, t) { e.fn.insertAtCaret = function (e) { return this.each(function () { var a, n, o, r, c = this, l = 0, s = 0, i = "selectionStart" in c && "selectionEnd" in c; (c.tagName && "textarea" === c.tagName.toLowerCase() || c.tagName && "input" === c.tagName.toLowerCase() && "text" === c.type.toLowerCase()) && (a = c.scrollTop, i ? (l = c.selectionStart, s = c.selectionEnd) : (c.focus(), (r = t.selection.createRange()).moveStart("character", -c.value.length), l = r.text.length), s < l && (s = l), n = c.value.substring(0, l), o = c.value.substring(s, c.value.length), c.value = n + e + o, l += e.length, i ? (c.selectionStart = l, c.selectionEnd = l) : ((r = t.selection.createRange()).moveStart("character", l), r.moveEnd("character", 0), r.select()), c.scrollTop = a) }) } }(jQuery, document, window);
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "insert-at-caret",
"version": "1.1.4",
"version": "1.1.5",
"description": "A jQuery plugin which inserts text to a text input or a textarea field at the caret's position.",
"main": "jquery.insert-at-caret.js",
"scripts": {
Expand All @@ -20,6 +20,10 @@
"jquery"
],
"author": "Emre Erkan",
"contributors": [
"kittsville",
"Nils-Berghs"
],
"license": "GPL-2.0",
"bugs": {
"url": "https://github.com/karalamalar/insertAtCaret/issues"
Expand Down

0 comments on commit 9d41035

Please sign in to comment.