CK editor find and replace will works only first time then it will gives index error in ranges[0].setStart function
问题 CK editor find and replace will work only first time then it always gives index error in ranges[0].setStart function. I have tried with editor.updateElement(); but it's not working. function test() { try { var editor = CKEDITOR.instances[("<%=ckDescription.ClientID %>")]; var sel = editor.getSelection(); var element = sel.getStartElement(); sel.selectElement(element); var findString = 'FE'; var ranges = editor.getSelection().getRanges(); var startIndex = element.getText().indexOf(findString);