|
|
@ -253,8 +253,16 @@ class SingleEditor extends Component {
|
|
|
|
texts=JSON.stringify(texts);
|
|
|
|
texts=JSON.stringify(texts);
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
// 提交到后台的内容需要处理一下;
|
|
|
|
// 提交到后台的内容需要处理一下;
|
|
|
|
value = JSON.stringify(value)
|
|
|
|
value = JSON.stringify(value);
|
|
|
|
texts = 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;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let question_choices = this.state.question_choices.slice(0);
|
|
|
|
let question_choices = this.state.question_choices.slice(0);
|
|
|
@ -317,16 +325,29 @@ class SingleEditor extends Component {
|
|
|
|
var texts="";
|
|
|
|
var texts="";
|
|
|
|
if(_text.length>=979){
|
|
|
|
if(_text.length>=979){
|
|
|
|
var result = _text.substring(0,975);
|
|
|
|
var result = _text.substring(0,975);
|
|
|
|
console.log("11111111");
|
|
|
|
// console.log("11111111");
|
|
|
|
console.log(result.length);
|
|
|
|
// console.log(result.length);
|
|
|
|
texts={"ops":[{"insert":result}]};
|
|
|
|
texts={"ops":[{"insert":result}]};
|
|
|
|
texts=JSON.stringify(texts);
|
|
|
|
texts=JSON.stringify(texts);
|
|
|
|
console.log("2222");
|
|
|
|
// console.log("2222");
|
|
|
|
console.log(texts.length);
|
|
|
|
// console.log(texts.length);
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
value = JSON.stringify(value)
|
|
|
|
value = JSON.stringify(value)
|
|
|
|
texts=value;
|
|
|
|
texts=value;
|
|
|
|
>>>>>>> 91722ce... 题库字数优化
|
|
|
|
>>>>>>> 91722ce... 题库字数优化
|
|
|
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
value = JSON.stringify(value);
|
|
|
|
|
|
|
|
if(value.length>=1000){
|
|
|
|
|
|
|
|
let a=value.length-1000;
|
|
|
|
|
|
|
|
let b=_text.length-a;
|
|
|
|
|
|
|
|
var result = _text.substring(0,b);
|
|
|
|
|
|
|
|
texts={"ops":[{"insert":result}]};
|
|
|
|
|
|
|
|
texts=JSON.stringify(texts);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
texts=value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
>>>>>>> 3610b7e... 多选题题库字数优化
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
question_titleysl: texts
|
|
|
|
question_titleysl: texts
|
|
|
@ -376,16 +397,29 @@ class SingleEditor extends Component {
|
|
|
|
var texts="";
|
|
|
|
var texts="";
|
|
|
|
if(_text.length>=979){
|
|
|
|
if(_text.length>=979){
|
|
|
|
var result = _text.substring(0,975);
|
|
|
|
var result = _text.substring(0,975);
|
|
|
|
console.log("33333333");
|
|
|
|
// console.log("33333333");
|
|
|
|
console.log(result.length);
|
|
|
|
// console.log(result.length);
|
|
|
|
texts={"ops":[{"insert":result}]};
|
|
|
|
texts={"ops":[{"insert":result}]};
|
|
|
|
texts=JSON.stringify(texts);
|
|
|
|
texts=JSON.stringify(texts);
|
|
|
|
console.log("44444444");
|
|
|
|
// ; console.log("44444444");
|
|
|
|
console.log(texts.length);
|
|
|
|
// console.log(texts.length)
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
value = JSON.stringify(value)
|
|
|
|
value = JSON.stringify(value)
|
|
|
|
texts=value;
|
|
|
|
texts=value;
|
|
|
|
>>>>>>> 91722ce... 题库字数优化
|
|
|
|
>>>>>>> 91722ce... 题库字数优化
|
|
|
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
value = JSON.stringify(value);
|
|
|
|
|
|
|
|
if(value.length>=1000){
|
|
|
|
|
|
|
|
let a=value.length-1000;
|
|
|
|
|
|
|
|
let b=_text.length-a;
|
|
|
|
|
|
|
|
var result = _text.substring(0,b);
|
|
|
|
|
|
|
|
texts={"ops":[{"insert":result}]};
|
|
|
|
|
|
|
|
texts=JSON.stringify(texts);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
texts=value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
>>>>>>> 3610b7e... 多选题题库字数优化
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
question_titlesysl: texts
|
|
|
|
question_titlesysl: texts
|
|
|
|