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

Function useIndent

packages/plugins/codeblock/src/hooks/use-indent.ts:6–12  ·  view source on GitHub ↗
(view: EditorView | null, tabSize: number)

Source from the content-addressed store, hash-verified

4import { useExtension } from './use-extension'
5
6export function useIndent(view: EditorView | null, tabSize: number) {
7 return useExtension(
8 view,
9 () => [EditorState.tabSize.of(tabSize), indentUnit.of(' '.repeat(tabSize))],
10 [tabSize],
11 )
12}

Callers 1

CodeBlockComponentFunction · 0.90

Calls 1

useExtensionFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…