tinymce Tinymce富文本
tinymce Tinymce富文本
Tinymce富文本。
注:第三方小部件默认并未注册,细节见定制小部件。
源代码
源代码。
代码演示
基础样例
最简单的用法。
import { Component } from '@angular/core';import { SFSchema } from '@delon/form';import { NzMessageService } from 'ng-zorro-antd/message';@Component({ selector: 'form-tinymce-simple', template: `<sf [schema]="schema" (formSubmit)="submit($event)"></sf>`})export class FormTinymceSimpleComponent { schema: SFSchema = { properties: { remark: { type: 'string', title: '描述', ui: { widget: 'tinymce' } } } }; constructor(public msg: NzMessageService) { } submit(value: any) { this.msg.success(JSON.stringify(value)); }}
API
ui 属性
| 成员 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| [config] | 配置项说明,见官网 | object | - |
|---|---|---|---|
| [loading] | 初始化提示文本 | string | 加载中… |
|---|---|---|---|
| [change] | 编辑器内容发生改变时会触发该事件 | (html: string) => void | - |
|---|---|---|---|
