[TOC]
介绍
<:richText inForm="true" required="true" id="emailEditor" label="邮件正文" accept="media" />
- inForm:是否在表单中,true/false,非必填,默认为false
- required:是否必填项,true/false,非必填,默认为false
- id:组件id,用来对编辑器进行数据操作,必填
- label:表单显示名称,仅inForm=true时生效
- accept: 图片上传支持的文件类型
使用示例:
- 示例位置:templates/system/demo/richtext.html
```java
<!DOCTYPE html>
<:include file=”../../common/css.html” title=”富文本”/>
<:include file=”../../common/js.html”/>
更多方法:
以下所有xx
皆为组件id
- tinymce.get(‘xx’).getContent():获取富文本内容
- tinymce.get(‘emailEditor’).setContent(‘’):设置富文本内容