Hi,
I'm trying to utilize JavaScript such that a user clicking on an item in a ListBox will take them to a specific location in CuteEditor. Version 2.0 of CuteEditor allowed me to use createTextRange(). However, this does not appear to work in Version 4.0.
var editor = document.getElementById( '<%=cedArticleText.ClientID%>' );
var editdoc = editor.GetDocument();
var text = editdoc.body.innerHTML;
var exp = new RegExp( item );
var found = exp.exec( text );
if ( found == null )
{
return;
}
var range = editdoc.body.createTextRange();
if ( range.findText( '[' + found[0] + ']' ) )
{
range.select();
range.scrollIntoView();
}
I've checked the value of range[0] and determined that its value is NaN. Any assistance would be greatly appreciated since I have very little experience with JavaScript.
Thanks in advance,
Fermin