【发布时间】:2019-07-18 16:08:10
【问题描述】:
我正在使用 react-email-editor 为我的应用程序生成 html 电子邮件模板。一切都很好,除了一个问题。有一个 onLoad 函数,它将任何 json 数据作为输入,并最初将其加载到编辑器中。现在,我想在编辑器页面上显示一些现有的 html,并希望使用 react-email-editor 包对其进行修改。
但我已经尝试了所有将 html 转换为 json 并将它们作为 onLoad 方法的输入提供的所有方法,但它无法正常工作。
这是链接 - https://github.com/unlayer/react-email-editor
并且包源代码是-https://github.com/unlayer/react-email-editor/blob/master/demo/src/index.js
请帮助我找到将现有 html 转换为 json 以用于 react-email-editor 的任何方法。
提前致谢!
【问题讨论】:
-
我也遇到了同样的问题,你找到解决办法了吗?
标签: javascript html json reactjs converters