【发布时间】:2016-01-12 07:41:02
【问题描述】:
我正在与使用 contentEditable 但不在 React 中的内容编辑器(特别是媒体编辑器)合作。我有一个用例,有人可以拖放图像,或者我可以插入图像。我的问题是不要将以下内容添加到编辑器的 html 中:
editorHtml += '<img src ="something />'
理想情况下,我想添加一个 React 组件。
editorHtml += '<CoverImage src="something" />'
也就是说,React Components 可以添加到 React Components 之外的 html 元素的 contentEditable 或 innerHtml 中吗?
【问题讨论】:
标签: javascript reactjs medium-editor