Caret postioning affected by glyphs usage in Internet explorer in designmode
-
Saturday, April 14, 2012 10:47 AM
Hi,
I try to use internet explorer as Html editor in designmode from Delphi. I use the Mshtml and SHDocVw units and editing goes fine. I also display some glyphs like the 'special characters' option in Word (e.g. paragraph: ¶). Now there appears to be a difference between caret positioning between Hiding Glyphs or Showing Glyphs.
1) Hidden glyphs
When pressing
<End>key on 'Sample Text', the Caret is positioned directly after the last character 't': Sample Text|When I now type the
<1>key, the html result is as I expected:<p>Sample Text1</p>2) Showing glyphs
When pressing
<End>key on 'Sample Text', the Caret is not directly positioned after the last character, but after the Glyph : Sample Text¶ |When I now type the
<2>key, the html result is<p>Sample Text</p>2So the '2' ends up outside the paragraph.
I also checked what happens if I hide the glyphs before pressing a non-system key:
3) Showing glyphs and hiding them afterwards
First show glyphs, press
<End>key on 'Sample Text', hide the glyphs, the Caret is still not directly positioned after the last character, there appears some space in the screen (no real character/element in the html-source however): Sample Text | When I now type the<3>key, the html result is<p>Sample Text</p>3So the '3' still ends up outside the paragraph.
The same problems exist with keys like
<Home>and the arrow keys.How can I prevent this? Is there a way to prevent caret placement after the glyph, or change it to the last character of the paragraph?
Kind regards,
Bert
All Replies
-
Monday, April 16, 2012 7:52 AMYou can try Regular expression
NEU_ShieldEdge
-
Tuesday, April 17, 2012 6:38 AM
Thank you for your answer,
Indeed I could use that, but if there's an other way by having more control over Caret placement, I would prefer that sollution.


