Skip to content

Vizel API / core/src / VizelCreateUploadEventHandlerOptions

Interface: VizelCreateUploadEventHandlerOptions

Defined in: packages/core/src/utils/editorHelpers.ts:120

Options for creating an image upload event handler.

Properties

getEditor

ts
getEditor: () => Editor | null | undefined;

Defined in: packages/core/src/utils/editorHelpers.ts:122

Function to get the current editor instance

Returns

Editor | null | undefined


getImageOptions

ts
getImageOptions: () => VizelImageFeatureOptions;

Defined in: packages/core/src/utils/editorHelpers.ts:124

Function to get the current image options

Returns

VizelImageFeatureOptions


getOnError?

ts
optional getOnError?: () => ((err) => void) | undefined;

Defined in: packages/core/src/utils/editorHelpers.ts:134

Function to get the editor-level onError sink.

Threading this getter lets the slash-command upload path reach the editor's onError so an upload rejection emits a VizelError (UPLOAD_FAILED) to observability sinks, not only the feature-level onUploadError. Adapters read the latest onError lazily because the consumer may reassign it after mount.

Returns

((err) => void) | undefined

Released under the MIT License.