MCPcopy
hub / github.com/basecamp/trix / getBlockAtPosition

Method getBlockAtPosition

src/trix/models/document.js:455–458  ·  view source on GitHub ↗
(position)

Source from the content-addressed store, hash-verified

453 }
454
455 getBlockAtPosition(position) {
456 const { index } = this.locationFromPosition(position)
457 return this.getBlockAtIndex(index)
458 }
459
460 getTextAtIndex(index) {
461 return this.getBlockAtIndex(index)?.text

Callers 5

insertDocumentAtRangeMethod · 0.95
trix.jsFile · 0.80

Calls 2

locationFromPositionMethod · 0.95
getBlockAtIndexMethod · 0.95

Tested by

no test coverage detected