@abdul778/page-editor 中文文档教程

发布于 3年前 浏览 24 项目主页 更新于 3年前

Easy email



使用 TypeScript

Introduction

Easy email是基于MJML开发的,具有很好的兼容性。 同时,它可以通过拖放编辑生成代码。

Features:

  • Drag and drop editor
  • Can be converted into MJML, or generated through MJML
  • Collect blocks and reuse them at other times
  • Defined custom block
  • Dynamic rendering
Video Overview
Overview
Watch video overview:https://www.bilibili.com/video/BV1YQ4y167bb

Live Demo

在此处查看现场演示:http://easy-email-m-ryan.vercel.app

Getting started

$ npm install --save easy-email-editor antd mjml-browser react-final-form

$ yarn add easy-email-editor antd mjml-browser react-final-form
import React from "react";
import { BlocksMap, EmailEditor, EmailEditorProvider } from "easy-email-editor";
import "easy-email-editor/lib/style.css";
import "antd/dist/antd.css";

const initialValues = {
  subject: "Welcome to Easy-email",
  subTitle: "Nice to meet you!",
  content: BlocksMap.getBlock("Page").create({}),
};

export function App() {
  return (
    <EmailEditorProvider data={initialValues}>
      {({ values }) => {
        return <EmailEditor height={"calc(100vh - 72px)"} />;
      }}
    </EmailEditorProvider>
  );
}

Docs

查看文档 获取指南和完整的 API 参考。

Examples

请参阅 https://github.com/m-Ryan/easy-email-demo

Development

$ git clone git@github.com:m-Ryan/easy-email.git
$ cd easy-email
$ yarn install

Start the dev server

$ yarn dev

License

MIT 许可证

Easy email



Using TypeScript

Introduction

Easy email is developed based on the MJML and has very good compatibility. At the same time, it can generate code through drag-and-drop editing.

Features:

  • Drag and drop editor
  • Can be converted into MJML, or generated through MJML
  • Collect blocks and reuse them at other times
  • Defined custom block
  • Dynamic rendering
Video Overview
Overview
Watch video overview:https://www.bilibili.com/video/BV1YQ4y167bb

Live Demo

Check out the live demo here: http://easy-email-m-ryan.vercel.app

Getting started

$ npm install --save easy-email-editor antd mjml-browser react-final-form

or

$ yarn add easy-email-editor antd mjml-browser react-final-form
import React from "react";
import { BlocksMap, EmailEditor, EmailEditorProvider } from "easy-email-editor";
import "easy-email-editor/lib/style.css";
import "antd/dist/antd.css";

const initialValues = {
  subject: "Welcome to Easy-email",
  subTitle: "Nice to meet you!",
  content: BlocksMap.getBlock("Page").create({}),
};

export function App() {
  return (
    <EmailEditorProvider data={initialValues}>
      {({ values }) => {
        return <EmailEditor height={"calc(100vh - 72px)"} />;
      }}
    </EmailEditorProvider>
  );
}

Docs

Check out documentation for guides and a full API reference.

Examples

Please see https://github.com/m-Ryan/easy-email-demo

Development

$ git clone git@github.com:m-Ryan/easy-email.git
$ cd easy-email
$ yarn install

Start the dev server

$ yarn dev

License

The MIT License

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文