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

Function Editor

packages/app-core/src/components/Editor.tsx:1319–1347  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1317}
1318
1319export function Editor(): JSX.Element {
1320 const paneLayout = useStore((s) => s.paneLayout)
1321 const activeNote = useStore((s) => s.activeNote)
1322 const keymapOverrides = useStore((s) => s.keymapOverrides)
1323 const vimInsertEscape = useStore((s) => s.vimInsertEscape)
1324 const zenMode = useStore((s) => s.zenMode)
1325
1326 useEffect(() => {
1327 registerVimCommands()
1328 }, [])
1329
1330 useEffect(() => {
1331 registerVimCommands()
1332 syncVimKeymaps(keymapOverrides)
1333 }, [keymapOverrides])
1334
1335 useEffect(() => {
1336 applyVimInsertEscape(vimInsertEscape)
1337 }, [vimInsertEscape])
1338
1339 return (
1340 <section className="flex min-w-0 flex-1 flex-col">
1341 <div className="flex min-h-0 min-w-0 flex-1">
1342 <PaneTreeView node={paneLayout} />
1343 </div>
1344 {!zenMode && activeNote && <StatusBar note={activeNote} />}
1345 </section>
1346 )
1347}
1348
1349function PaneTreeView({ node }: { node: PaneLayout }): JSX.Element {
1350 if (node.kind === 'leaf') {

Callers

nothing calls this directly

Calls 3

applyVimInsertEscapeFunction · 0.90
registerVimCommandsFunction · 0.85
syncVimKeymapsFunction · 0.85

Tested by

no test coverage detected