How to click on the picture in the rich text of the applet to display the preview effect

Presumably everyone knows that the rich-text tag in the WeChat developer documentation cannot obtain the pictures inside and add click events to the pictures, so what should we do?

We can introduce a component. Parser can click on the picture in the rich text to make the picture appear in preview state.
Component download address: parser.min.zip

After downloading, just pull the file into the editor. Next,
insert image description here
you need to configure it in app.json. After the configuration is
insert image description herecompleted, you can directly output it in html.
The following is the content in html
insert image description here
, and then the content in data in js.
insert image description here

Guess you like

Origin blog.csdn.net/qq_49552046/article/details/115949561