mailui.init({
features: {
preview: true,
userUploads: {
enabled: true,
authAlert: false,
},
stockImages: {
enabled: true,
safeSearch: true,
},
stockLibrary: {
enabled: true,
safeFilter: true,
},
saveToLibrary: {
enabled: true,
},
undoRedo: true,
smartMergeTags: true,
sendTestEmail: true,
aiGenerative: {
enabled: true,
},
},
});
mailui.init({
features: {
preview: false
}
})
// Show the preview
mailui.showPreview();
// Hide the preview
mailui.hidePreview();
mailui.addEventListener("preview:changed", function (data: { preview: boolean }) {
// Save the changes
});
userUploads
provides a drag-and-drop upload option along with a list of uploaded files.mailui.init({
features: {
userUploads: {
enabled: true,
authAlert: false,
},
}
})
mailui.registerProvider("userUploads", async (params: { page: number, perPage: number }, done: Function) => {
var page = params.page || 1;
var lastPage = 5;
var perPage = params.perPage || 20;
var total = 100;
console.log("params", params);
/**
* Load images for page X from your server here...
*/
const images: any[] = [];
done(images, {page, lastPage, perPage, total});
});
mailui.init({
features: {
stockImages: {
enabled: true,
safeSearch: true,
},
}
})
mailui.init({
features: {
stockLibrary: {
enabled: true,
safeFilter: true,
}
}
})
mailui.init({
features: {
saveToLibrary: {
enabled: true,
}
}
})
mailui.init({
features: {
undoRedo: false
}
})
// Undo last action
mailui.undo()
// Redo last action
mailui.redo()
// Any action in queue to undo?
mailui.canUndo()
// Any action in queue to redo?
mailui.canRedo()
mailui.init({
features: {
smartMergeTags: true
}
})
mailui.init({
features: {
smartLinks: true
}
})
mailui.init({
features: {
aiGenerative: {
enabled: true,
}
}
})