MCPcopy Create free account
hub / github.com/editablejs/editable / toYRange

Method toYRange

packages/plugins/codeblock/src/plugin/yjs/sync.ts:74–79  ·  view source on GitHub ↗

* @param range

(range: cmState.SelectionRange)

Source from the content-addressed store, hash-verified

72 * @param range
73 */
74 toYRange(range: cmState.SelectionRange) {
75 const assoc = range.assoc
76 const yanchor = this.toYPos(range.anchor, assoc)
77 const yhead = this.toYPos(range.head, assoc)
78 return createYRange(yanchor, yhead)
79 }
80
81 /**
82 * @param yrange

Callers 1

constructorMethod · 0.80

Calls 2

toYPosMethod · 0.95
createYRangeFunction · 0.90

Tested by

no test coverage detected