mailui.init({
features: {
customImageLibrary: {
enabled: true
},
},
});
uploader
, you can use the following callbacks for uploading image.mailui.registerCallback(
"image:customLibrary",
async (params: { mediaType: string }, done: Function) => {
// Add your custom logic here.
// Open your image gallery, allow the user to select an image,
// and then pass the selected image to the callback function 'done'.
// pass image object
done({ id: 1, fileName: "", src: "" }); // done(); if not select image or cancel selection
}
);
Property | Description | Type | Default |
---|---|---|---|
mediaType | Different type of media can be specify | image icon | image |
Property | Description | Type | Default |
---|---|---|---|
id | Unique number | any | - |
fileName | Media file name | string | - |
src | Media full url | string | - |