||View All MessagesBack to WebFX|
I don't know if this helps (you have given little information) but:-
1. I assume you are using IE.
2. I assume that you are using the IE TextRange object.
3. I assume that rather than using the TextRange.find method (which should work fine), you are searching using the moveStart and moveEnd methods on a range, or using indexOf on the range.text.
4. I think that newlines are a combination of Code 10 (Carriage Return) and Code (13) Enter. However the text range skips Code 13.
5. Thus given the character sequence
13,10,13,10,H,e,l,l,o indexOf will give a position "4" for the start of Hello.
However if we ignore the 13's
10,10,H,e,l,l,o indexOf will give a position "4" is the "l"
So I tend to strip out the 13's before using indexOf
Sent: September 28, 2004
Subject: Re:Wierd behaviors with richedit and usebr
I'm using richedit for an editor, and im using the usebr="true" attribute. I noticed that when you put a couple of enters and then put your cursor after the last enter you put and press left a few times, the cursor acts wierd and skips some br's. Why is this?
Another (more important) possibly related question is when I get the textRange in the iframe, the enters mess me up there. For example if I want to find "hello" and bold it it will do it fine, but if i put 2 enters first, it will bold just the llo and two characters after it. So the enters are shifting something around. Is there anything strange about newlines in the textrange that I should know about? Like is the newline really 2 characters or something?
Thanks in advance,