首页 > 技术文章 > 获取到富文本内容 修改img样式

duokexiao 2021-03-26 09:25 原文

const regex = new RegExp('<img', 'gi')
res.details = details.replace(regex, `<img style="max-width: 100%; height: auto"`);

  

推荐阅读