When I try to insert text into the infragistics web editor it fails in the javascript for the method insertAtCaret. The error is 'Unable to get property 'startContainer' of undefined or null reference'. It is occurring at line 428 when I debug the javascript
var src,afterNode,cont=range.startContainer,pos=range.startOffset;
Is there any way to use this method in IE11?
Thanks
Hello,
Thank you for contacting us.
About this issue, could you please give me your exact product version, also keep in mind that support of "insert" action in IE is rather limited (compare to other browsers) and IE does not support inserting objects, but only strings. It automatically generates objects if inserted string can be interpret as html objects. That problem with IE forces the editor to convert inserted objects to string before doing actual insert.
If application needs to insert an object, then it should use object, but not string.
Example:var img = document.createElement('IMG');img.src = './arrow_black.gif';_editor.insertAtCaret(img);
It will be highly appreciated if you could send me isolated sample reproducing the issue.
Looking forward to hearing from you.
I read in another post "Since IE9 the functionality of selection/activation/focus in IE changed. Old selection in previous active element is not maintained and it gets reset after lost focus. That means that if end user changed focus (clicked on INPUT or similar element located outside of editing area of WebHtmlEditor), then selection/caret in WebHtmlEditor is lost and browser inserts text at different place (mostly at the beginning). Unfortunately WebHtmlEditor is not able to get around that feature of IE."
Is there a way to set the caret position in the editor?
Hi,
If you need further assistance regarding this, contact me
Thank you for your feedback and for sharing this with us.
I believe that the other community members could benefit from such threads.
I wasn't able to get the set cursor position to work, I wrote a workaround where I place some placeholder text at the position of the cursor before it loses focus then I replace that text with the value that I need.