|
@@ -303,7 +303,8 @@ class EditableSpan extends Component{
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
let tmpVal = data.substr(0,data.length-1)
|
|
let tmpVal = data.substr(0,data.length-1)
|
|
- handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
|
|
|
|
|
|
+ // handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
|
|
|
|
+ removeId && removeId({boxMark,i:index-1,text:""});
|
|
preObj.html(tmpVal)
|
|
preObj.html(tmpVal)
|
|
if(preObj[0].nodeName !=="DIV"){
|
|
if(preObj[0].nodeName !=="DIV"){
|
|
moveEnd(preObj[0]);
|
|
moveEnd(preObj[0]);
|
|
@@ -353,7 +354,7 @@ class EditableSpan extends Component{
|
|
const isFull = full?' '+style['full']:''; //是否宽度设为整行宽度
|
|
const isFull = full?' '+style['full']:''; //是否宽度设为整行宽度
|
|
//有标点符号之外的字符或者前一个标签有选中值时,显示为黑色,否则查体中,有体征标记显示蓝色,否则灰显
|
|
//有标点符号之外的字符或者前一个标签有选中值时,显示为黑色,否则查体中,有体征标记显示蓝色,否则灰显
|
|
const ext = preIsExt?style['ext']:style['unselect'];
|
|
const ext = preIsExt?style['ext']:style['unselect'];
|
|
- const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
|
|
|
|
|
|
+ const unselect = value.match(config.punctuationReg)||(preSelected&&preSelected.match(config.punctuationReg))?'':ext;
|
|
const hasBr = br?style['editable-br']:''; //最后一个体征标签换行
|
|
const hasBr = br?style['editable-br']:''; //最后一个体征标签换行
|
|
const selectedArea = mouseSelect?style['selected-area']:'';
|
|
const selectedArea = mouseSelect?style['selected-area']:'';
|
|
const $span = this.$span.current;
|
|
const $span = this.$span.current;
|
|
@@ -361,10 +362,8 @@ class EditableSpan extends Component{
|
|
if(br&&$span&&!$span.innerText){
|
|
if(br&&$span&&!$span.innerText){
|
|
this.$span.current.innerHTML=' ';
|
|
this.$span.current.innerHTML=' ';
|
|
}
|
|
}
|
|
-
|
|
|
|
- return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2,unselect?8:6),selectedArea);
|
|
|
|
|
|
+ return classNames(style['editable-span'],isFull,hasBr,setFontColorSize(2,unselect?6:8),unselect,selectedArea);
|
|
}
|
|
}
|
|
-
|
|
|
|
render() {
|
|
render() {
|
|
return <span className={this.getClass()}
|
|
return <span className={this.getClass()}
|
|
contentEditable='true'
|
|
contentEditable='true'
|