1.0.9 • Published 4 years ago
sobotp-pc v1.0.9
编辑开始
yarn add sobotp-pc
富文本组件使用
import { RichText } from sobotp-pc;
const options = {
styles:{
width:600,
height: 500
},
contentStyles:{
width:'100%',
height:300
},
controls:[
'undo', 'redo', 'separator',
'font-size', 'line-height', 'letter-spacing', 'separator',
'text-color', 'bold', 'italic', 'underline', 'strike-through', 'separator',
'superscript', 'subscript', 'remove-styles', 'separator', 'text-indent', 'text-align', 'separator',
'headings', 'list-ul', 'list-ol', 'blockquote', 'code', 'separator',
'link', 'media','separator',
'clear'
],
uploadFile:{
url:`/kb/docUploadFile`,
data:{
type:"ajax"
}
}
const getTxt = data => {
console.log(data);
};
<RichText {...options} onBlur={getTxt}/>