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

    Props a custom block's Editor receives in the course builder.

    interface CustomBlockEditorProps<TData = unknown> {
        data: TData;
        onChange: (data: TData) => void;
        resolveMediaUrl: (
            media: MediaRef,
            options?: { stream?: boolean },
        ) => Promise<string>;
        uploadMedia: (file: File) => Promise<MediaRef>;
    }

    Type Parameters

    • TData = unknown
    Index

    Properties

    data: TData

    The block's data.

    onChange: (data: TData) => void

    Replace the block's data.

    resolveMediaUrl: (
        media: MediaRef,
        options?: { stream?: boolean },
    ) => Promise<string>

    A URL to load a stored file from.

    uploadMedia: (file: File) => Promise<MediaRef>

    Store a file and get a reference to it (list it in fileRefs so it is shared with the lesson).