微信小程序使用的是

1. wxml 页面元素的最简单使用
<rich-text nodes="{{这是你的数据}}"></rich-text>
 
2. js部分
如下可以直接获取


支付宝小程序

1. axml 页面简单使用
<rich-text nodes="{{nodes}}" ></rich-text>
 
2. js部分
 
import parser from 'rich-text-parser'    //这个文件是引用是关键下载地址:https://github.com/Chaunjie/rich-text-parser
Page({
data: {
     txte1: “”,
     nodes: [],
},
onLoad(e) {
     let that = this
     let txte1 = e.txte
     // const {p} = that.data
  // 定义需要解析的特殊标签,value不填默认是div
  // parser.definedCustomTag({figure: 'p', figcaption: ''})
  const nodes = parser.getRichTextJson(txte1)
        that.setData({
  nodes: nodes.children
  })
 },
});

这些数据我是上一个页面传递新来的


首次记录学习过程有不足之处请多见谅!!!

最新文章

  1. SharePoint 部署解决方案Feature ID冲突
  2. parseInt第二个参数详解
  3. VC++ 中使用 std::string 转换字符串编码
  4. IOS深入学习(3)之Control Object
  5. ios电话监听状态
  6. shell 空格问题
  7. C#WinForm中复制、粘贴文本到剪贴板
  8. Java 动态绑定
  9. Linux上的oracle巡检脚本
  10. Find a way--hdu2612
  11. python3.4学习笔记(八) Python第三方库安装与使用,包管理工具解惑
  12. jquery选择器总结2
  13. IOS statusBarStyle 设置
  14. Luogu 1220 关路灯(动态规划)
  15. centos上搭建git服务--4
  16. Sql Server 2005 镜像后收缩日志
  17. VS2013下的64位与32位程序配置
  18. Windows操作系统下给文件夹右键命令菜单添加启动命令行的选项
  19. AML与PIO整合问题
  20. Frogs&#39; Neighborhood(POJ1659+Havel-Hakimi定理)

热门文章

  1. C/C++ 中的宏/Macro
  2. goweb-搭建服务
  3. Html5 Canvas动画基础碰撞检测的实现
  4. This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app&#39;s Info.plist must contain an NSPhotoLibraryAddUsageDescription key with a string value
  5. ios11下适配UItableView
  6. Word List
  7. ubuntu 桌面版, ssh 连接时使用,x转发进行使用 gnome-terminal 时出现:Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached 错误
  8. Python 对列表嵌套的数据进行排序
  9. Linux Thermal Framework分析及实施
  10. ASA 笔记