textarea-selection-bounds
Version:
A handy package to get the bounds of the current text selection in a textarea element
8 lines • 368 B
JavaScript
import { TextareaSelectionBounds } from './index.js';
const textarea = document.getElementById('textarea');
const textareaLimit = document.getElementById('textareaLimit');
const a = new TextareaSelectionBounds(textarea, { debug: true });
setInterval(() => {
textarea.style.height = `${a.getBounds('full').height + 10}px`;
}, 2000);
//# sourceMappingURL=test.js.map