如上所述,每当我在CKEditor的文本区域中键入内容时,其他文本区域似乎就很滞后。我有3个CKEditors。我正在使用此库https://www.npmjs.com/package/react-ckeditor-component。如果其中一个文本框包含值,并且我开始在另一个文本区域中键入内容,那么当我键入文本时,文本值将开始变得不规则和不规则。
import CKEditor from "react-ckeditor-component";
onChangeMaintenance(evt){
let maintenanceNewContent = evt.editor.getData();
this.setState({
maintenanceContent: maintenanceNewContent,
checkSaveData: 'true'
})
}
onChangeNotes(evt){
let notesNewContent = evt.editor.getData();
this.setState({
notesContent: notesNewContent,
checkSaveData: 'true'
})
}
onChangeRedFlag(evt){
let redNewContent = evt.editor.getData();
this.setState({
redFlagContent: redNewContent,
checkSaveData: 'true'
})
}
<div className="col-xs-5 col-sm-5 col-md-5 col-lg-5">
<div className="panel panel-default">
<div className="panel-heading panel-heading-custom2">
<h3 className="panel-title"><center>Red Flags</center></h3>
</div>
<CKEditor
activeClass="redflags"
content={this.state.redFlagContent}
events={{
"change": this.onChangeRedFlag
}}
config= {{removeButtons: 'Outdent,Indent,Styles,Undo,Redo,Select,PasteText,PasteFromWord,HiddenField,CreateDiv,Cut,Copy,Paste,Source,Format,Maximize,Anchor,Superscript,Subscript,RemoveFormat,About,Strike,Blockquote,Table,ShowBlocks, Find, specialChars,HorizontalRule,select', height: 120,
removePlugins: 'resize,elementspath,save,image,flash,iframe,link,smiley,tabletools,find,pagebreak,templates,about,maximize,showblocks,newpage,language,scayt,wsc,select,specialchar, magicline',
autoParagraph: false
}}
/>
</div>
<div className="panel panel-default">
<div className="panel-heading panel-heading-custom4">
<h3 className="panel-title"><center>Maintenance Releases</center></h3>
</div>
<CKEditor
activeClass="maintenance"
content={this.state.maintenanceContent}
events={{
"change": this.onChangeMaintenance
}}
config= {{removeButtons: 'Outdent,Indent,Styles,Undo,Redo,Select,PasteText,PasteFromWord,HiddenField,CreateDiv,Cut,Copy,Paste,Source,Format,Maximize,Anchor,Superscript,Subscript,RemoveFormat,About,Strike,Blockquote,Table,ShowBlocks, Find, specialChars,HorizontalRule,select', height: 120,
removePlugins: 'resize,elementspath,save,image,flash,iframe,link,smiley,tabletools,find,pagebreak,templates,about,maximize,showblocks,newpage,language,scayt,wsc,select,specialchar, magicline',
autoParagraph: false
}}
/>
</div>
<div className="panel panel-default">
<div className="panel-heading panel-heading-custom5">
<h3 className="panel-title"><center>Notes</center></h3>
</div>
<CKEditor
activeClass="maintenance"
content={this.state.notesContent}
events={{
"change": this.onChangeNotes
}}
config= {{removeButtons: 'Outdent,Indent,Styles,Undo,Redo,Select,PasteText,PasteFromWord,HiddenField,CreateDiv,Cut,Copy,Paste,Source,Format,Maximize,Anchor,Superscript,Subscript,RemoveFormat,About,Strike,Blockquote,Table,ShowBlocks, Find, specialChars,HorizontalRule,select', height: 120,
removePlugins: 'resize,elementspath,save,image,flash,iframe,link,smiley,tabletools,find,pagebreak,templates,about,maximize,showblocks,newpage,language,scayt,wsc,select,specialchar, magicline',
autoParagraph: false
}}
/>
</div>