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

Function handlePaste

external/.scrollLibs.js:11200–11211  ·  view source on GitHub ↗
(e, cm)

Source from the content-addressed store, hash-verified

11198 }
11199
11200 function handlePaste(e, cm) {
11201 var pasted = e.clipboardData && e.clipboardData.getData("Text")
11202 if (pasted) {
11203 e.preventDefault()
11204 if (!cm.isReadOnly() && !cm.options.disableInput) {
11205 runInOp(cm, function () {
11206 return applyTextInput(cm, pasted, 0, null, "paste")
11207 })
11208 }
11209 return true
11210 }
11211 }
11212
11213 function triggerElectric(cm, inserted) {
11214 // When an 'electric' character is inserted, immediately trigger a reindent

Callers 1

.scrollLibs.jsFile · 0.85

Calls 3

runInOpFunction · 0.85
applyTextInputFunction · 0.85
getDataMethod · 0.80

Tested by

no test coverage detected