小程序rich-text替代方案mp-html
https://github.com/jin-yufeng/mp-html
uni-app 中使用table、video、svg 等)latex 公式等)≈25KB,9KB gzipped)在使用中,有些文章我复制了微信公众号的文章(从135中复制代码,贴到wordpress的html代码 ),小程序中就不显示图片了,然后我在小程序js中判断内容是否包含video字符
this.setData({
isvideo:res.data.content.rendered.indexOf('video')
})
因为rich-text不能显示video,所以含有video,就使用mp-html插件,不含有就用rich-text
<view class="art" wx:if="{{ isvideo != -1 }}">
<mp-html content="{{art.content.rendered}}"></mp-html>
</view>
<view class="art" wx:else>
<rich-text nodes="{{ art.content.rendered}}"></rich-text>
</view>
坚持的力量
wordpress建站,视频剪辑拍摄,动画制作