UNPKG

textarea-selection-bounds

Version:

A handy package to get the bounds of the current text selection in a textarea element

8 lines 350 B
import { TextareaSelectionBounds } from './index.js'; const textarea = document.getElementById('textarea'); const textareaLimit = document.getElementById('textareaLimit'); const a = new TextareaSelectionBounds(textarea, { debug: true, limits: ['self', textareaLimit] }); setInterval(() => { a.getBounds(); }, 10); //# sourceMappingURL=test.js.map