diff --git a/docs/component/editor.md b/docs/component/editor.md index 0f33e172049134ed931a2dc458c4af8ae3000216..f01616f59b84be4e50fa0829ba2cc2aa3d571979 100644 --- a/docs/component/editor.md +++ b/docs/component/editor.md @@ -63,6 +63,7 @@ editor组件目前只有H5、App的vue页面、微信小程序、百度小程序 * 插入 html 到编辑器内时,编辑器会删除一些不必要的标签,以保证内容的统一。例如`

xxx

`会改写为`

xxx

` * 编辑器聚焦时页面会被上推,系统行为以保证编辑区可见 * H5端会动态引入依赖 [quill.min.js](https://unpkg.com/quill@1.3.7/dist/quill.min.js)、[image-resize.min.js](https://unpkg.com/quill-image-resize-mp@3.0.1/image-resize.min.js),依赖从 [unpkg.com](https://unpkg.com) 加载,如过依赖加载较慢,可以下载下来放在自己的服务器或 CDN 服务商,然后在 [自定义模板](/collocation/manifest?id=h5-template) head 内引入。 +* 不能直接插入视频,编辑时可以采用视频封面占位,并在图片属性中保存视频信息,预览时再还原为视频。 **示例代码** [查看演示](https://hellouniapp.dcloud.net.cn/pages/component/editor/editor) @@ -83,16 +84,16 @@ editor组件目前只有H5、App的vue页面、微信小程序、百度小程序 } }, methods: { - onEditorReady() { - // #ifdef MP-BAIDU - this.editorCtx = requireDynamicLib('editorLib').createEditorContext('editorId'); - // #endif - - // #ifdef APP-PLUS || H5 ||MP-WEIXIN - uni.createSelectorQuery().select('#editor').context((res) => { - this.editorCtx = res.context - }).exec() - // #endif + onEditorReady() { + // #ifdef MP-BAIDU + this.editorCtx = requireDynamicLib('editorLib').createEditorContext('editorId'); + // #endif + + // #ifdef APP-PLUS || H5 ||MP-WEIXIN + uni.createSelectorQuery().select('#editor').context((res) => { + this.editorCtx = res.context + }).exec() + // #endif }, undo() { this.editorCtx.undo()