文本域 textarea

说明

文本域允许用户输入多行文本。

示例

{
    "id": "textarea",
    "name": "文本域",
    "type": "textarea",
    "maxLength": 100
}

默认属性

属性 说明 类型 默认值
checkSensitive 是否进行敏感词检查 Boolean false
description 描述 String ''
dist 输出值 Object {value: '', backgroundColor: 'transparent', color: '#000000', align: 'left', fontWeight: 'normal', italic: false, underline: false, fontSize: 14}
dynamic 发布后是否可修改 Boolean true
fontSizeOptions 字体大小选项(单位:px) Array [14, 16, 18, 20, 24, 28, 36, 44, 60, 76, 100]
maxLength 最大长度(0代表不生效) Number 0
minLength 最小长度(0代表不生效) Number 0
name 名称 String ''
placeholder 输入提示 String ''
toolbar 工具栏选项 Array []
type 类型 String 'textarea'
vip 是否为付费功能 Boolean false
/**
 * 默认配置 - 文本域
 */
module.exports = {
    /**
     * 是否检查敏感词
     * @type {Boolean}
     */
    checkSensitive: true,
    /**
     * 描述
     * @type {String}
     */
    description: '',
    /**
     * 发布后是否可修改
     * @type {Boolean}
     */
    dynamic: true,
    /**
     * 字号可选项
     * @type {Array}
     */
    fontSizeOptions: [
        14, 16, 18, 20, 24, 28, 36, 44, 60, 76, 100
    ],
    /**
     * 最大长度
     * @type {Number}
     */
    maxLength: 0,
    /**
     * 最小长度
     * @type {Number}
     */
    minLength: 0,
    /**
     * 名称
     * @type {String}
     */
    name: '',
    /**
     * 输入提示
     * @type {String}
     */
    placeholder: '',
    /**
     * 支持的工具栏
     * @type {Array}
     */
    toolbar: [],
    /**
     * 类型
     * @type {String}
     * @required
     */
    type: 'textarea',
    /**
     * 输出
     * @type {Object}
     */
    dist: {
        value: '',
        backgroundColor: 'transparent',
        color: '#000000',
        align: 'left',
        fontWeight: 'normal',
        italic: false,
        underline: false,
        fontSize: 14
    },
    /**
     * 付费功能
     * @type {Boolean}
     */
    vip: false
};

附录

1. 工具栏选项

当toolbar属性中,出现以下工具栏选项,分别对应会出现的工具是:

  • fontSize 字体大小
  • fontWeight 粗体
  • italic 斜体
  • underline 下划线
  • align 对齐方式(左、中、右、两端)
  • color 字体颜色
  • backgroundColor 背景颜色

results matching ""

    No results matching ""