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

Method insertChildParticle

external/.scrollLibs.js:22844–22850  ·  view source on GitHub ↗
(text, index)

Source from the content-addressed store, hash-verified

22842 return this.insertChildParticle(text, index)
22843 }
22844 insertChildParticle(text, index) {
22845 const singleParticle = new Particle(text).getSubparticles()[0]
22846 const newParticle = this.insertLineAndSubparticles(singleParticle.getLine(), singleParticle.subparticlesToString(), index)
22847 const stumpParserIndex = this.filter(particle => particle.isHtmlTagParser).indexOf(newParticle)
22848 this.getShadow().insertHtmlParticle(newParticle, stumpParserIndex)
22849 return newParticle
22850 }
22851 isInputType() {
22852 return ["input", "textarea"].includes(this.getTag()) || this.get("contenteditable") === "true"
22853 }

Callers 3

dragoverHandlerMethod · 0.80
_mountHtmlMethod · 0.80

Calls 8

getShadowMethod · 0.95
getSubparticlesMethod · 0.80
subparticlesToStringMethod · 0.80
indexOfMethod · 0.80
getLineMethod · 0.45
filterMethod · 0.45
insertHtmlParticleMethod · 0.45

Tested by

no test coverage detected