easy-email-editor
v4.16.1
Published
Email editor
Downloads
22,209
Readme
Easy-email-editor
Introduction
Email render and preview container.
usage
$ npm install --save easy-email-editor
or
$ yarn add easy-email-editor
import React from 'react';
import { BlockManager } from 'easy-email-core';
import { EmailEditor, EmailEditorProvider } from 'easy-email-editor';
import 'easy-email-editor/lib/style.css';
const initialValues = {
subject: 'Welcome to Easy-email',
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>
);
}