that.content = item.content.replace(/<p([\s\w"=\/\.:;]+)((?:(style="[^"]+")))/ig, '<p').replace(/<p>/ig,
'<p style="font-size: 15Px; line-height: 25Px;">')
.replace(/<img([\s\w"-=\/\.:;]+)((?:(height="[^"]+")))/ig, '<img$1')
.replace(/<img([\s\w"-=\/\.:;]+)((?:(width="[^"]+")))/ig, '<img$1')
.replace(/<img([\s\w"-=\/\.:;]+)((?:(style="[^"]+")))/ig, '<img$1')
.replace(/<img([\s\w"-=\/\.:;]+)((?:(alt="[^"]+")))/ig, '<img$1')
.replace(/<img([\s\w"-=\/\.:;]+)/ig, '<img$1 style="width: 80%;height:400upx border-radius: 8Px;"');
方法一 這種用法導致我解析出錯率頻發
const regex = new RegExp('<img', 'gi');
richtext= richtext.replace(regex, `< img style="max-width: 100%;"`);
方法二 圖片太大,脫離文檔流
const regex = new RegExp('<img', '