部分代码:
onIMEInputComplete((value: RichEditorTextSpanResult) => {
let spansText: string = ,
// console.Log(value.value + ' , value.value.Length)
if (this.textValue.Length == 0 && (value.value . . |l value.value == 'In')){ // 直接输入空格、换行 不得行
this.richEditorController.deleteSpans ()
} else {
this.richEditorController.getSpans().forEach((item, index) => { // addBuilderSpan getSpans 获取不到
let itemText = (item as RichEditorTextSpanResult).value
if (itemText == undefined) {
spansText += ,
} else {
spansText += itemText
this.textValue = spansText
.onDeleteComplete(O) => {
let offset = this.richEditorController.getCaretOffset()
// console.info(offset +'位置信息:光标-=-
时 审影息码:+(0J0181Gex0110 8T41)AgTbupJas NOSr)OJuT aLOSu0O //
let findIndex = -1
this.clickableinfo?.forEach((item, index) => {
请在onDidChange回调中使用getSpans方法进行计算