MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / focusCellAt

Method focusCellAt

packages/app-core/src/lib/cm-table.ts:191–200  ·  view source on GitHub ↗
(addr: CellAddress)

Source from the content-addressed store, hash-verified

189 }
190
191 private focusCellAt(addr: CellAddress): void {
192 const view = this.view
193 const dom = view.contentDOM.querySelector<HTMLElement>(
194 `.cm-table-widget [data-row="${addr.row}"][data-col="${addr.col}"]`
195 )
196 if (dom) {
197 dom.focus()
198 placeCaretEnd(dom)
199 }
200 }
201
202 /** Pull every cell's text out of the DOM into the model. `data-raw` holds the
203 * markdown source — `textContent` would lose it when a cell shows rendered

Callers 1

applyModelMethod · 0.95

Calls 1

placeCaretEndFunction · 0.85

Tested by

no test coverage detected