@beisen-cmps/platform-richtexteditor
v0.1.28
Published
## 提交
Downloads
69
Readme
组件使用、扩展文档
提交
- 修改package.json中的devDependencies里依赖版本, @beisen/gulp-lib -> 0.1.1; @beisen/storybook-lib -> 0.3.0
- npm install
- 修改代码后执行 npm run lib进行编译
- 更新package.json中的 version版本号
- push代码
- 在cmp.beisen.io站点,头部导航的《服务》中查看编译是否通过
使用参数
{
text: this.props.text || '',
value: this.props.value || '',
"cmp_id": "c569ca1e-e58b-4a54-8a82-274ebc654162",
"cmp_name": "xiaoshu7",
"cmp_type": "BC_TextAreaRTF",
"cmp_label": "富文本dev",
"cmp_data": {
"title": "富文本dev",
"field_name": "fuwenben13",
"required": false,
"cmp_state": "create",
"cmp_status": "editable",
"editdisplaystate": "editable",
"createdisplaystate": "editable",
"showdisplaystate": "readonly",
formatType: "percentageSymbol",
"datasourcename": "BCStaffDataSource",
"dataType": "Text",
},
"form_errors":{},
"search_data": {
},
"biz_data": { "text": "" },
"validators": {},
styleTitle: 'rightFlush', // "upAndDown" , "rightFlush", "leftFlush", label的位置上下还是左右
"base_data": { //基础组件配置参数
toolbar: [ //工具栏显示的功能,数组类型,下面为默认值
'source | undo redo | bold italic underline strikethrough | forecolor | fullscreen |',
'insertorderedlist insertunorderedlist | cleardoc removeformat | fontfamily fontsize' ,
'| justifyleft justifycenter justifyright justifyjustify indent outdent |',
'link unlink | image video music',
'| horizontal preview inserttable '
],
videoConfig: { //视频相关配置
autoplay: false, //自动播放,默认false
loop: true //循环播放,默认false
},
imageUrl: "http://demo-cloud.italent.link/api/v2/Data/File", //本地上传时的上传地址,默认为当前页面地址
parameter: "app=BeisenCloudDemo&metaObjName=BeisenCloudDemo.123", //本地上传时的参数,开头不加 &
localUpload: false //默认false,开启本地上传功能
},
onChange: (textVal) => {} , //回调事件
"translation": { //多语言参数
"umRichTextEditorLang": "zh-cn" // { zh-cn | en } 编辑器语言
}
}
组件使用
- npm install @beisen-cmps/platform-richtexteditor
- import PlatFormTextRichEditor from '@beisen-cmps/platform-richtexteditor'
render() {
return <PlatFormTextRichEditor {...this.props}/>;
}