MCPcopy Create free account
hub / github.com/breck7/scroll / setPlaceholder

Function setPlaceholder

external/.scrollLibs.js:13331–13341  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

13329 }
13330 }
13331 function setPlaceholder(cm) {
13332 clearPlaceholder(cm)
13333 var elt = (cm.state.placeholder = document.createElement("pre"))
13334 elt.style.cssText = "height: 0; overflow: visible"
13335 elt.style.direction = cm.getOption("direction")
13336 elt.className = "CodeMirror-placeholder CodeMirror-line-like"
13337 var placeHolder = cm.getOption("placeholder")
13338 if (typeof placeHolder == "string") placeHolder = document.createTextNode(placeHolder)
13339 elt.appendChild(placeHolder)
13340 cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild)
13341 }
13342
13343 function onComposition(cm) {
13344 setTimeout(function () {

Callers 3

onCompositionFunction · 0.85
onBlurFunction · 0.85
onChangeFunction · 0.85

Calls 1

clearPlaceholderFunction · 0.85

Tested by

no test coverage detected