Init commit

This commit is contained in:
Asraelite 2023-10-30 16:41:48 +01:00
commit c45ad79440
48 changed files with 6786 additions and 0 deletions

View file

@ -0,0 +1,25 @@
/* SelectHelper.js
* written by Colin Kuebler 2012
* Part of LDT, dual licensed under GPLv3 and MIT
* Convenient utilities for cross browser textarea selection manipulation
*/
var SelectHelper = {
add: function( element ){
element.insertAtCursor = element.createTextRange ?
// IE version
function(x){
document.selection.createRange().text = x;
} :
// standards version
function(x){
var s = element.selectionStart,
e = element.selectionEnd,
v = element.value;
element.value = v.substring(0, s) + x + v.substring(e);
s += x.length;
element.setSelectionRange(s, s);
};
}
};