|
|
|
@ -3238,7 +3238,7 @@ const luckysheetformula = { |
|
|
|
let value = $editer.text(), |
|
|
|
valuetxt = value; |
|
|
|
|
|
|
|
if (value.length > 0 && !(value1txt.substr(0, 1) != "=" && value1.indexOf("span")>-1) && (kcode != 229 || value.length == 1)) { |
|
|
|
if (value.length > 0 && value1txt.substr(0, 1) == "=" && (kcode != 229 || value.length == 1)) { |
|
|
|
value = _this.functionHTMLGenerate(value); |
|
|
|
value1 = _this.functionHTMLGenerate(value1txt); |
|
|
|
|
|
|
|
@ -3266,10 +3266,31 @@ const luckysheetformula = { |
|
|
|
} |
|
|
|
|
|
|
|
$functionbox.html(value); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
else if(value1txt.substr(0, 1) != "=" && value1.indexOf("span")>-1){ |
|
|
|
else if(value1txt.substr(0, 1) != "=" && (kcode != 229 || value.length == 1)){ |
|
|
|
//&& value1.indexOf("span")>-1
|
|
|
|
// $editer.html(value1);
|
|
|
|
$functionbox.html(value); |
|
|
|
let w = window.getSelection(); |
|
|
|
if(w!=null && w.type!="None"){ |
|
|
|
let range = w.getRangeAt(0); |
|
|
|
let c = range.startContainer; |
|
|
|
|
|
|
|
if(c.id=="luckysheet-rich-text-editor" || $(c).closest("#luckysheet-rich-text-editor")){ |
|
|
|
$functionbox.html(value); |
|
|
|
} |
|
|
|
else if(c.id=="luckysheet-functionbox-cell" || $(c).closest("#luckysheet-functionbox-cell")){ |
|
|
|
if(value1.indexOf("span")>-1){ |
|
|
|
|
|
|
|
} |
|
|
|
else{ |
|
|
|
$editer.html(value); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
_this.rangestart = false; |
|
|
|
|