gadapchetvoi
07-16-2008, 03:35 AM
Good morning, everyone.
I'm having big trouble with browser compatibility when trying to make a richtext Editor run on both IE & FF. I'm very glad if you can solve it.
Let's zoom in the detail : In order to run on both IE & FF, my editor must bases on "iframe" element with "designMode=on" but not "div" element.
Anyway, I have to get the range(Selection) that user selected in the Editor field , and run some function with it. With IE, this work as expected, but with FF, I can't find the way to grab the selection start Index (Position) & end Index.
I tried "editor.selectionStart" , but it seems this way's for textbox only.
I tried "editor.contentWindow.getSelection()" , but this Object doesn't have such a property like "StartPoint" , it can return the text value only.
Although I've tried whole yesterday for Googling. I'm awaiting any suggestion with high appriciate......
Tks 4 readin'
I'm having big trouble with browser compatibility when trying to make a richtext Editor run on both IE & FF. I'm very glad if you can solve it.
Let's zoom in the detail : In order to run on both IE & FF, my editor must bases on "iframe" element with "designMode=on" but not "div" element.
Anyway, I have to get the range(Selection) that user selected in the Editor field , and run some function with it. With IE, this work as expected, but with FF, I can't find the way to grab the selection start Index (Position) & end Index.
I tried "editor.selectionStart" , but it seems this way's for textbox only.
I tried "editor.contentWindow.getSelection()" , but this Object doesn't have such a property like "StartPoint" , it can return the text value only.
Although I've tried whole yesterday for Googling. I'm awaiting any suggestion with high appriciate......
Tks 4 readin'