import {
createRegistry,
mergeRegistries,
defaultRegistry,
EmailEditor,
EditorProvider,
} from "@open-email/editor";
const customComponents = [
{
type: "helper-text",
label: "Helper Text",
icon: "info",
category: "content",
description: "Small text for hints",
acceptsChildren: false,
defaultProps: {
content: "Hint: This is useful.",
color: "#64748b",
},
properties: [
{
key: "content",
label: "Text",
type: "text",
group: "content",
},
{
key: "color",
label: "Color",
type: "color",
group: "style",
},
],
},
];
const myRegistry = mergeRegistries(defaultRegistry, customComponents);
// ... inside your app
// ... inside your app
function App() {
return (
<EditorProvider>
<EmailEditor
config={{
registry: myRegistry,
}}
/>
</EditorProvider>
);
}