Skip to content

Vizel API / svelte/src / VizelContextAccessor

Interface: VizelContextAccessor

Defined in: packages/svelte/src/components/VizelContext.ts:15

Reactive accessor object returned by getVizelContext and getVizelContextSafe.

Reading .current from inside a reactive context ($derived, $effect, a template expression) registers the read as a dependency, so the consumer re-evaluates whenever the provided editor changes. Mirrors the Svelte 5 idiom for exposing runes through plain objects.

Properties

current

ts
readonly current: Editor | null;

Defined in: packages/svelte/src/components/VizelContext.ts:17

The currently provided editor instance, or null when not ready.

Released under the MIT License.