Repository: icindy/wxParse Branch: master Commit: 9d5df482294b Files: 25 Total size: 150.2 KB Directory structure: gitextract_bpvhgwvx/ ├── .gitignore ├── LICENSE ├── README.md ├── app.js ├── app.json ├── app.wxss ├── config.js ├── package.json ├── pages/ │ ├── index/ │ │ ├── index.js │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ └── lab/ │ ├── lab.js │ ├── lab.json │ ├── lab.wxml │ └── lab.wxss ├── utils/ │ ├── api.js │ └── util.js └── wxParse/ ├── html2json.js ├── htmlparser.js ├── showdown.js ├── wxDiscode.js ├── wxParse.js ├── wxParse.wxml └── wxParse.wxss ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # kdiff3 ignore *.orig # maven ignore target/ # eclipse ignore .settings/ .project .classpath # idea ignore .idea/ *.ipr *.iml *.iws # temp ignore *.log *.cache *.diff *.patch *.tmp # system ignore .DS_Store Thumbs.db # package ignore (optional) # *.jar # *.war # *.zip # *.tar # *.tar.gz # nodejs ignore node_modules/ .vscode/ jsconfig.json typings/ ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2016 Di Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================

抱歉各位,本项目已经停止维护,为了不给您使用造成问题,请仅做参考使用,感谢各位支持

wxParse-微信小程序富文本解析组件

支持Html及markdown转wxml可视化

版本号:0.3

来源: [微信小程序开发论坛-weappdev](https://weappdev.com)

作用: 将Html/Markdown转换为微信小程序的可视化方案

## 特性 | 支持特性 | 实验功能 | ToDo | | ------------- |-------------| -----| | - [x] HTML的大部分标签解析 | [x] 小表情emjio | [x] table标签 | | - [x] 内联style | [x] a标签跳转 | | | - [x] 标签Class | [x] 动态添加 | | | - [x] 图片自适应规则 | | | | - [x] 图片多图片预览 | | | | - [x] 模版层级可扩展性 | | | | - [x] 多数据循环方式 | | | | - [x] 内联style | | | | | | | ## 相关截图 ![相关截图](screenshoot/screen.jpg) ## 感谢 [@stonewen](https://github.com/stonewen)| [@Daissmentii](https://github.com/Daissmentii) | [@wuyanwen](https://github.com/wuyanwen) | [@vcxiaohan](https://github.com/vcxiaohan) | ## 基本使用方法 * 1. Copy文件夹`wxParse` ``` - wxParse/ -wxParse.js(必须存在) -html2json.js(必须存在) -htmlparser.js(必须存在) -showdown.js(必须存在) -wxDiscode.js(必须存在) -wxParse.wxml(必须存在) -wxParse.wxss(必须存在) -emojis(可选) ``` * 2. 引入必要文件 ``` //在使用的View中引入WxParse模块 var WxParse = require('../../wxParse/wxParse.js'); ``` ``` //在使用的Wxss中引入WxParse.css,可以在app.wxss @import "/wxParse/wxParse.wxss"; ``` * 3. 数据绑定 ``` var article = '
我是HTML代码
'; /** * WxParse.wxParse(bindName , type, data, target,imagePadding) * 1.bindName绑定的数据名(必填) * 2.type可以为html或者md(必填) * 3.data为传入的具体数据(必填) * 4.target为Page对象,一般为this(必填) * 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选) */ var that = this; WxParse.wxParse('article', 'html', article, that, 5); ``` * 4. 模版引用 ``` // 引入模板 //这里data中article为bindName