Skip to content

Variable: imageUpload ​

ts
const imageUpload: (options) => Extension;

Upload images that are pasted, dropped or chosen with a file picker (uploadImages(editor, files)), showing an accessible progress placeholder ([data-rte-upload], role="progressbar", CSS variable --rte-upload-progress) where each will appear. Requires advancedSchema().

Parameters ​

ParameterType
optionsImageUploadOptions

Returns ​

Extension

Example ​

ts
imageUpload({
  upload: fetchUploader({ url: '/api/upload' }),
  onError: (error) => toast(error.message),
})