Hiyve Components - v1.0.0
    Preparing search index...

    Interface UseNoteEditorOptions

    Options for the useNoteEditor hook.

    interface UseNoteEditorOptions {
        editable?: boolean;
        extensions?: {
            highlight?: boolean;
            links?: boolean;
            tables?: boolean;
            taskLists?: boolean;
            textColor?: boolean;
        };
        initialContent?: JSONContent;
        onBlur?: () => void;
        onContentError?: (error: Error) => void;
        onFocus?: () => void;
        onUpdate?: (content: JSONContent) => void;
        placeholder?: string;
    }
    Index

    Properties

    editable?: boolean

    Whether the editor is editable

    extensions?: {
        highlight?: boolean;
        links?: boolean;
        tables?: boolean;
        taskLists?: boolean;
        textColor?: boolean;
    }

    Extension options

    Type Declaration

    • Optionalhighlight?: boolean

      Enable highlighting (default: true)

    • Optionallinks?: boolean

      Enable hyperlinks (default: true). URLs are linked as they are typed or pasted; a click opens the link in a new tab, while editing too. Documents containing links require this to be on — with it off they cannot be loaded.

    • Optionaltables?: boolean

      Enable table support (default: true)

    • OptionaltaskLists?: boolean

      Enable task lists (default: true)

    • OptionaltextColor?: boolean

      Enable text color (default: true)

    initialContent?: JSONContent

    Initial content for the editor

    onBlur?: () => void

    Callback when editor is blurred

    onContentError?: (error: Error) => void

    Called when a document cannot be loaded because it contains a node or mark the editor does not support. The editor falls back to an empty document in that case, so this is how "empty" is told from "could not be shown".

    onFocus?: () => void

    Callback when editor is focused

    onUpdate?: (content: JSONContent) => void

    Callback when content updates

    placeholder?: string

    Placeholder text when empty