View Single Post
Old 12-05-2012, 02:12 PM   PM User | #2
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
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.
__________________
Found a flower or bug and don't know what it is ?
agrozoo.net galery
if you don't spot search button at once, there is search form:
agrozoo.net galery search

Last edited by BubikolRamios; 12-05-2012 at 04:04 PM..
BubikolRamios is offline   Reply With Quote