So, in order to do something you must read selection underlying HTML.
One cross browser method is here:
http://www.codingforums.com/archive/.../t-154848.html, scroll to bottom.
Now the problem that exist all the time, regardles of method used for reading
underlying HTML .....
consider this (note extra space in second line):
Code:
(<font color='blue'>foo</font>)
( <font color='blue'>foo</font> )
In first case selecting 'foo' and using func for reading HTML, return would be 'foo', in second case selecting ' foo ' (with spaces) return would be ' <font color='blue'>foo</font> ' (with spaces).
This(getting html) even work if you have 'foo,' and select all that, but gives you one extra unwanted ',' (in this case) inside HTML.
Any solution to this ?
All upper statements tested on FF.
EDIT: the prob is in contentEditable = /true/false. In IE works OK regardlesa of state, in FF works same as IE OK if false, otherwise not.