小程序的editor与rich-text组件中图片的问题?
发布于 7 年前 作者 tao56 9947 次浏览 来自 官方Issues

<editor id="editor" class="ql-container" placeholder="{{placeholder}}" showImgSize showImgToolbar showImgResize bindstatuschange="onStatusChange" bindready="onEditorReady" bindinput="oninput">
</editor>
<rich-text nodes="{{html}}"></rich-text>

在小程序的editor组件的事例代码中添加了

<rich-text nodes="{{html}}"></rich-text>

这段代码,意思检查一下rich-text,当我添加图片时,rich-text编译的图片会大很多,超出全屏?

求解

2 回复

设置图片样式 应该可以解决的

insertImage 的時候設置下 class / widht&height 就可以了。

editor 內部設置了最大寬度100%,放到 rich-text 里沒有這個限制了

回到顶部