将配置直接传递到config
属性中:
<CKEditor
editor={ this.state.editor }
data={this.state.content}
// ...
config={
toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ],
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h1', title: 'heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h2', title: 'heading 2', class: 'ck-heading_heading2' }
]
}
}
// ...
/>