浏览模式: 普通 | 列表
4月, 2024 | 1

uniapp-app使用富文本编辑器editor

[ 2024-04-30 14:31:05 | 作者: admin ]
使用的是uniapp内置组件的表单组件editor:
editor 组件 | https://uniapp.dcloud.net.cn/component/editor.html

editor 组件对应的 editorContext 实例:editorContext | https://uniapp.dcloud.net.cn/api/media/editor-context.html

文档上写的也不是特别详细,还以为得npm,但没npm也能用

注意:editor不能封装为组件,否则报错(在其他文章看的)


初始化富文本编译器内容(回显)
echo(html) {
        
        setTimeout(() => {
          uni.createSelectorQuery().select('#editor').context((res) => {
            let editorCtx = res.context;
...

阅读全文…
1