0.0.10 • Published 3 years ago

@webull/mail-editor v0.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Usage

import Editor, { exportToHtml, convertHTML } from '@webull/mail-editor';

const value =
  '<div style="word-break: break-all; width: 768px; " data-version="0.0.10" data-from="webullMailEditor"><table style="width: 100%; border-collapse: collapse; table-layout: fixed; height: 100%; "><tbody><tr><td style="padding: 20px; " data-type="undefined"></td></tr></tbody></table></div>';


const App = () => {
  const onChange = (dataSource: any) => {
    console.log(dataSource);
    console.log(exportToHtml(dataSource));
  };

  const onExport = (value: string) => {
    console.log(value);
  };
  return (
    <div>
      <Editor
        language="zh"
        onChange={onChange}
        value={value}
        onExport={onExport}
      />
    </div>
  );
};

API

  • language: 语言,仅支持(zh、en、zh-hant)
  • onChange
  • value
  • onExport: 导出方法,返回html字符串
  • exportText: 导出按钮的自定义名称,string类型
0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago