Guides
Image Upload (New)
Uploading images in the editor
1
Add image extension
Configure image extension with your styling. The imageClass
is used for styling the placeholder image.
2
Create upload function
onUpload
should return a Promise<string>
validateFn
is triggered before an image is uploaded. It should return a boolean
value.
image-upload.ts
3
Configure events callbacks
This is required to handle image paste and drop events in the editor.
editor.tsx
4
Update slash-command suggestionsItems