capricorncd / zx-editor

The HTML document (rich text) editor in Smart phone browser or webview, supporting mixed layout, reference, headline, unordered list, font color, bold and italics. 移动端HTML文档(富文本)编辑器,支持图文混排、引用、大标题、无序列表,字体颜色、加粗、斜体
https://capricorncd.github.io/zx-editor/demo
331 stars 100 forks source link

你好 为什么在小程序里报错呢? #19

Open dzcms opened 5 years ago

dzcms commented 5 years ago

thirdScriptError sdk uncaught third Error Cannot read property 'createElement' of undefined TypeError: Cannot read property 'createElement' of undefined

dzcms commented 5 years ago

import 一引入就报错

capricorncd commented 5 years ago

小程序里没有document/window浏览器对象,所以无法通过document去创建浏览器的dom元素。

dzcms commented 5 years ago

你好,有没有办法做小程序的适配呢?

capricorncd commented 5 years ago

另外加载一个url(url 是编辑器网页)。这个编辑器不支持小程序环境。