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

Method getCharacterAtPosition

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

Source from the content-addressed store, hash-verified

472 }
473
474 getCharacterAtPosition(position) {
475 const { index, offset } = this.locationFromPosition(position)
476 return this.getTextAtIndex(index).getStringAtRange([ offset, offset + 1 ])
477 }
478
479 getLength() {
480 return this.blockList.getEndPosition()

Callers 2

applyBlockAttributeMethod · 0.80
applyBlockAttributeMethod · 0.80

Calls 3

locationFromPositionMethod · 0.95
getTextAtIndexMethod · 0.95
getStringAtRangeMethod · 0.45

Tested by

no test coverage detected