@prosekit/svelte
Version:
Svelte components and utilities for ProseKit
9 lines (8 loc) • 315 B
TypeScript
import type { EditorState } from '@prosekit/pm/state';
import { type UseExtensionOptions } from './use-extension';
/**
* Calls the given handler whenever the editor state changes.
*
* @public
*/
export declare function useStateUpdate(handler: (state: EditorState) => void, options?: UseExtensionOptions): void;