@blocknote/react
Version:
A "Notion-style" block-based extensible text editor built on top of Prosemirror and Tiptap.
12 lines (11 loc) • 578 B
TypeScript
import { BlockNoteEditor, Styles, StyleSchema } from "@blocknote/core";
/**
* Returns the currently active text styles (e.g., bold, italic) at the editor's
* current cursor position or selection. Re-renders automatically when the active
* styles change.
*
* @param editor - The BlockNote editor instance. If omitted, uses the editor
* from the nearest `BlockNoteContext`.
* @returns The set of active styles at the current cursor position or selection.
*/
export declare function useActiveStyles<T extends StyleSchema>(editor?: BlockNoteEditor<any, any, T>): Styles<T>;