diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js index 36ef4c61f..25aab75a1 100644 --- a/public/react/src/modules/question/component/ChoquesEditor.js +++ b/public/react/src/modules/question/component/ChoquesEditor.js @@ -236,23 +236,8 @@ class ChoquesEditor extends Component{ texts=""; } } else { - if(_text.length>=500){ - var result = _text.substring(0,450); - texts={"ops":[{"insert":result}]}; - texts=JSON.stringify(texts); - }else { - // 提交到后台的内容需要处理一下; - value = JSON.stringify(value); - if(value.length>=500){ - let a=value.length-500; - let b=_text.length-a; - var result = _text.substring(0,b); - texts={"ops":[{"insert":result}]}; - texts=JSON.stringify(texts); - }else{ - texts=value; - } - } + value = JSON.stringify(value); + texts=value; } let question_choices = this.state.question_choices.slice(0); question_choices[index] = texts; diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index c1255c83a..39c2e447e 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -258,23 +258,8 @@ class SingleEditor extends Component{ texts=""; } } else { - if(_text.length>=500){ - var result = _text.substring(0,450); - texts={"ops":[{"insert":result}]}; - texts=JSON.stringify(texts); - }else { - // 提交到后台的内容需要处理一下; - value = JSON.stringify(value); - if(value.length>=500){ - let a=value.length-500; - let b=_text.length-a; - var result = _text.substring(0,b); - texts={"ops":[{"insert":result}]}; - texts=JSON.stringify(texts); - }else{ - texts=value; - } - } + value = JSON.stringify(value); + texts=value; } let question_choices = this.state.question_choices.slice(0); question_choices[index] = texts;