Universal block
A "Universal block" is a way to save basic elements for reuse. For example, if you use a header or footer in all email templates, you can save it to avoid starting from scratch for each new email.
There are two usage options:
Edit in all instances:
If you want your edits to reflect in every template that includes that content, choose this option.
Unlink and edit independently:
If you want edits to apply only to the template you are currently editing, choose this option.
Usage
Check here https://github.com/m-Ryan/easy-email-pro/blob/master/demo/src/hooks/useUniversalElement.tsx
Interface
universalElementSetting?: {
elements: Record<string, Element>;
list: Array<{
label: string;
elements: Array<{
element: Element;
thumbnail: string;
}>;
}>;
onAddElement: (params: {
name: string;
element: Element;
thumbnail: Blob;
}) => Promise<Element>;
onUpdateElement: (params: {
uid: string;
element: Element;
thumbnail: Blob;
}) => Promise<any>;
};