UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

56 lines (55 loc) 1.24 kB
import type { FormBaseControlSchema, FormControlProps, SchemaApi } from '../types'; export interface RichTextControlSchema extends FormBaseControlSchema { type: 'input-rich-text'; /** * 编辑器类型 */ vendor?: 'froala' | 'tinymce'; /** * 图片保存 API * * @default /api/upload/image */ receiver?: SchemaApi; /** * 视频保存 API * * @default /api/upload/video */ videoReceiver?: SchemaApi; /** * 接收器的字段名 */ fileField?: string; /** * 边框模式,全边框或者没边框。 */ borderMode?: 'full' | 'half' | 'none'; /** * tinymce 或 froala 的配置 */ options?: any; } export interface RichTextControlSchemaV2 extends FormBaseControlSchema { type: 'input-rich-text-v2'; /** * 图片保存 API * * @default /api/upload/image */ receiver?: SchemaApi; /** * 视频保存 API * * @default /api/upload/video */ videoReceiver?: SchemaApi; /** * 接收器的字段名 */ fileField?: string; } export interface RichTextProps extends FormControlProps { options?: any; vendor?: 'froala' | 'tinymce'; }