ChartWay
ChartWay
  • 发布:2018-09-26 16:43
  • 更新:2019-07-11 11:41
  • 阅读:9416

uni-app中的rich-text富文本的样式问题

分类:uni-app

富文本代码

<rich-text :nodes="htmlString"></rich-text>

加入富文本里面有h2、img等标签,如何去定义这些标签的样式?

2018-09-26 16:43 负责人:无 分享
已邀请:
唱歌去旅行
Yunter丶

Yunter丶 - 一个切图仔

//富文本图片处理 其他未测试
var body = res.data.body.replace(/\<img/gi, '<img style="display:-webkit-box;width:90% !important;margin:10px auto !important;" ');
this.body = body;

  • 匿名wx

    请问 里面有的img标签是单独的 有的img标签是嵌套了一层或者多层在外面该怎么弄呢

    2020-03-29 20:48

该问题目前已经被锁定, 无法添加新回复