MCPcopy
hub / github.com/yabwe/medium-editor / placeCursorInsideElement

Function placeCursorInsideElement

spec/helpers/util.js:206–212  ·  view source on GitHub ↗
(el, index)

Source from the content-addressed store, hash-verified

204}
205
206function placeCursorInsideElement(el, index) {
207 var selection = window.getSelection(),
208 newRange = document.createRange();
209 selection.removeAllRanges();
210 newRange.setStart(el, index);
211 selection.addRange(newRange);
212}
213
214function selectElementContents(el, options) {
215 options = options || {};

Callers 3

toolbar.spec.jsFile · 0.85
selection.spec.jsFile · 0.85
content.spec.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…