我想使用Kendo UI添加编辑器。但我在TypeError: list is undefined
node_modules/@progress/kendo-ui/js/editor/plugins/inlineformat.js:422
我使用以下方法安装了库:
npm install --save @progress/kendo-editor-react-wrapper
这是我的组成部分。
import React, { Component } from 'react';
// import PropTypes from 'prop-types';
import { Editor } from '@progress/kendo-editor-react-wrapper';
class SLEditor extends Component {
constructor(props) {
super(props);
this.state = {
value: ''
};
}
render() {
return (
<div>
<Editor value={this.state.value} height={500} />
</div>
);
}
}
export default SLEditor;
答案 0 :(得分:0)
只需要一个配置:
<Editor
value={this.value}
height={500}
tools={[
'bold',
'italic',
'underline',
'foreColor',
'insertUnorderedList',
'insertOrderedList',
'createTable',
'addColumnLeft',
'addColumnRight',
'addRowAbove',
'addRowBelow',
'deleteRow',
'deleteColumn',
'justifyLeft',
'justifyCenter',
'justifyRight'
]}
/>