CodeBlockRenderHandoff
A handoff claimed by the render of a code block whose source a write just changed.
Import:
import type { CodeBlockRenderHandoff } from '@mnaoumov/obsidian-lib/code-block-render-handoff';Signature:
export interface CodeBlockRenderHandoffProperties
| Property | Type | Description |
|---|---|---|
| hasFocus | boolean | Whether the write recorded a focused element to restore. |
| restoreFocus | () => Promise<boolean> | Puts the focus back on the element at the same position inside the new render, with the same text selection. Call it once the processor has rendered the block. It waits for the element to be attached to a document. |
| state | unknown | The state passed to the write, or undefined when none was. |
Links to this page: