Skip to content

Instantly share code, notes, and snippets.

View renanveroneze's full-sized avatar
🎯
Focusing

Renan Veroneze renanveroneze

🎯
Focusing
View GitHub Profile
@renanveroneze
renanveroneze / caret.js
Created October 4, 2020 01:00 — forked from islishude/caret.js
get/set caret position in contentEditable or textarea/input element(JavaScript)
/**
* @file get/set caret position and insert text
* @author islishude
* @license MIT
*/
export class Caret {
/**
* get/set caret position
* @param {HTMLColletion} target
*/