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

    Interface UseAssignmentEditorOptions

    Options for the useAssignmentEditor hook.

    Configures the TipTap editor instance with assignment-specific extensions and behavior. The hook manages editor lifecycle including initialization, content updates, and cleanup.

    interface UseAssignmentEditorOptions {
        editable?: boolean;
        extensions?: {
            embeds?: boolean;
            highlight?: boolean;
            tables?: boolean;
            taskLists?: boolean;
            textColor?: boolean;
        };
        initialContent?: JSONContent;
        onBlur?: () => void;
        onFocus?: () => void;
        onUpdate?: (content: JSONContent) => void;
        placeholder?: string;
    }
    Index

    Properties

    editable?: boolean

    Whether the editor is editable

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

    Extension options

    Type Declaration

    • Optionalembeds?: boolean

      Enable inline file embeds (image / pdf / audio / video / whiteboard / midi clip) via the assignment-embed node (default: true). When disabled the editor still parses existing embeds (so old documents round-trip) but the toolbar's insert action and the picker callback are no-ops.

    • Optionalhighlight?: boolean

      Enable highlighting (default: true)

    • 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

    onFocus?: () => void

    Callback when editor is focused

    onUpdate?: (content: JSONContent) => void

    Callback when content updates

    placeholder?: string

    Placeholder text when empty