Skip to main content

Image

Installation#

npm install @udecode/plate-image
npm install @udecode/plate-ui-image

Usage#

Live Editor
Result

Options#

export interface ImagePlugin {
/**
* An optional method that will upload the image to a server.
* The method receives the base64 dataUrl of the uploaded image, and should return the URL of the uploaded image.
*/
uploadImage?: (
dataUrl: string | ArrayBuffer
) => Promise<string | ArrayBuffer> | string | ArrayBuffer;
}

Source Code#