Functional background: It is necessary to display background rich text editor settings articles or other html codes in the Baidu applet. Using v-html in vue and wxParse in the WeChat applet does not work. I searched for official documents and found < rich- text > component
code example
.swan code
<rich-text nodes="{
{content}}"></rich-text>
Introduction to the official property name
Some pictures are not fully displayed after direct reference, and the picture width needs to be set in the .js file
.js code
content = content.replace(/\<img/gi, '<img style="width:100%;height:auto;"')
Perform regular matching on the img tag to set the style for the img tag