Taro-ParserRichText
                                
                                 Taro-ParserRichText copied to clipboard
                                
                                    Taro-ParserRichText copied to clipboard
                            
                            
                            
                        适用于 Taro 的小程序富文本组件
Taro-ParserRichText
适用于 Taro 的小程序富文本组件,是对 Parser 的一个 Taro 组件封装
目前只适用于微信小程序
用法
- 将 ParserRichText文件夹复制到项目components文件夹中
- 在需要富文本渲染的页面/组件中导入组件 import ParserRichText from '组件路径';
- 需要使用的地方使用 ParserRichText组件即可,访问 Parser 了解参数详情及注意事项
- 在 NervJS/taro#3885 未解决之前,需要在 config/index.js 文件中添加 config.copy.patterns 复制组件到目标文件夹。参考:config/index.js#L32
请访问 Parser 原仓库了解更多参数详解及注意事项
Demo 示例
本组件用于 SteamCN 论坛微信小程序 主贴内容及回复内容的富文本渲染,可在此项目中参考使用方法及预览效果
组件中使用:https://github.com/xPixv/SteamCN-Mini-Program/blob/master/src/components/ReplyCard/replyCard.tsx
页面中使用:https://github.com/xPixv/SteamCN-Mini-Program/blob/master/src/pages/thread/thread.tsx
反馈及建议
欢迎 提出 issue 及 PR