微信小程序 rich-text
来源:互联网 发布:程序员竖屏显示器推荐 编辑:程序博客网 时间:2024/05/29 13:24
rich-text
- 属性:nodes 类型:Array / String 结点列表 / HTML String
- 全局支持class和style属性,不支持id属性。
- 结点类型:type = node
name 标签名 String 是 支持部分受信任的HTML结点
attrs 属性 Object 否 支持部分受信任的属性,遵循Pascal命名法
children 子结点列表 Array 否 结构和nodes一致 - 结点类型:type = text
text 文本 String 是 支持entities - nodes 不推荐使用 String 类型,性能会有所下降
- rich-text 组件内屏蔽所有结点的事件。
- attrs 属性不支持 id ,支持 class 。
- name 属性大小写不敏感。
- 如果使用了不受信任的HTML结点,该结点及其所有子结点将会被移除。
- img 标签仅支持网络图片。
<rich-text nodes="{{nodes}}" /><rich-text nodes="{{nodes1}}" /><rich-text nodes="{{nodes2}}" />
this.setData({ nodes: "<h1 style='color:red;'>html标题</h1>", nodes1: [{ name: "h1", attrs: { style: "color:red", class: "red" }, children: [{ type: "text", text: '结点列表标题' }] }], nodes2: [{ name: "ul", attrs: { style: "padding:20px;border:1px solid blue;", class: "red" }, children: [ { name: "li", attrs: { style: "color:red", class: "red" }, children: [{ type: "text", text: '多层结点 无序列表' }], }, { name: "li", attrs: { style: "color:red", class: "red" }, children: [{ type: "text", text: '多层结点 无序列表1' }], }] }]})
阅读全文
0 0
- 微信小程序 rich-text
- 微信小程序 rich-text a标签
- [微信小程序] rich-text富文本
- 微信小程序----组件之rich-text
- Rich Text
- Rich Text
- 小程序rich-text在iso上无效的问题
- TextView实现Rich Text
- Rich Text Processing
- On-Line Rich Text Editor.
- RAILS 2 TINYMCE RICH TEXT
- 自己实现Rich Text Editor
- UNITY UGUI Rich Text 控件
- 微信小程序-text
- Web-Based Rich Text Editors Compared
- 20 Excellent Free Rich-Text Editors
- 9个最好的Rich Text编辑器
- Display Rich Text Using a UIWebView
- java 实现word 转PDF (采用第三方技术 IText、Poi、Jsoup)
- POJ. 2253 Frogger (Dijkstra )
- jquery获取span标签下的第一个span子标签内容
- EL表达式与jQuery的$()
- MFC多语言开发
- 微信小程序 rich-text
- Scala基本语法(三)
- json对象和json字符串
- 在eclipse中使用自己下载的maven安装步骤
- QT-各版本的下载链接
- 基于application的程序,要求能够从文本文件(text.txt)中统计出英文字母的个数和大写字母的个数,并输出。
- Genymotion模拟器
- PLSQL Developer怎样设置为中文
- 梯度下降法的三种形式BGD、SGD以及MBGD