Appearance
Template Example
You are reading the Email Editor v3 docs
Email Editor v4 is the current version. See this page in the v4 docs, or how to upgrade to v4.
A template is the mj-global-style root that carries the global styles, fonts, and the mj-body holding every section. This is the top-level shape returned to onSave and accepted by load.
ts
type TopolTemplate = {
tagName: "mj-global-style";
attributes: {
"h1:color": string;
"h1:font-family": string;
"h2:color": string;
"h2:font-family": string;
"h3:color": string;
"h3:font-family": string;
":color": string;
":font-family": string;
":line-height": string;
"a:color": string;
"button:background-color": string;
containerWidth: number;
fonts: string;
"mj-text": {
"line-height": number;
"font-size": number;
"font-family"?: string;
};
"mj-button": {
"font-family"?: string;
"background-color"?: string;
color?: string;
};
};
children: [
{
tagName: "mj-body";
attributes: {
"background-color": string;
containerWidth: number;
};
children: TopolSection[];
}
];
style: {
h1: {
"font-family": string;
"font-size": string;
};
h2: {
"font-size": string;
"font-family": string;
};
h3: {
"font-size": string;
"font-family": string;
};
p: {
"font-size": string;
"font-family": string;
};
ul: {
"font-size": string;
"font-family": string;
};
li: {
"font-size": string;
"font-family": string;
};
ol: {
"font-size": string;
"font-family": string;
};
a: {
color: string;
};
};
fonts: string[];
};