mailbroad-editor
v1.0.2
Published
Email editor
Downloads
220
Readme
mailbroad-editor
Introduction
Email render and preview container.
usage
$ npm install --save mailbroad-editor
or
$ yarn add mailbroad-editor
import React from 'react';
import { BlockManager } from 'mailbroad-core';
import { EmailEditor, EmailEditorProvider } from 'mailbroad-editor';
import 'mailbroad-editor/lib/style.css';
const initialValues = {
subject: 'Welcome to mailbroad',
subTitle: 'Nice to meet you!',
content: BlockManager.getBlockByType(BasicType.PAGE).create({}),
};
export function App() {
return (
<EmailEditorProvider
data={initialValues}
height={'calc(100vh - 72px)'}
>
{({ values }) => {
return <EmailEditor />;
}}
</EmailEditorProvider>
);
}