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

Method enterNormalCell

packages/app-core/src/lib/cm-table.ts:889–897  ·  view source on GitHub ↗

Put a focused cell into NORMAL mode: non-editable, raw source shown, with * the block cursor drawn over the current character.

(cell: HTMLElement)

Source from the content-addressed store, hash-verified

887 /** Put a focused cell into NORMAL mode: non-editable, raw source shown, with
888 * the block cursor drawn over the current character. */
889 private enterNormalCell(cell: HTMLElement): void {
890 cell.setAttribute('contenteditable', 'false')
891 cell.classList.add('is-vim-normal')
892 // Show the raw source so motions map to real characters (and are
893 // measurable for the block cursor).
894 cell.textContent = cell.dataset.raw ?? ''
895 cell.dataset.rendered = 'false'
896 this.renderCellCursor(cell)
897 }
898
899 private clearCellCursor(cell: HTMLElement): void {
900 cell.querySelector('.cm-table-cell-cursor')?.remove()

Callers 2

buildCellMethod · 0.95
onCellKeydownMethod · 0.95

Calls 1

renderCellCursorMethod · 0.95

Tested by

no test coverage detected