I am working on
a project that acts like a text/WYSIWYG editor. So far everything is great except for one thing (some of the buttons don't work on the toolbar through the above link, they're for future stuff)....
My project makes excessive use of execCommand(), a very useful IE-only method that dynamically changes formatting options. The page that I use this on is a frames page. The top frame is a menu that has nothing to do with my problem. The bottom frame contains another frameset. Top frame = toolbar, bottom = editable area (as you can see through the link above).
When I select some text and press a button on the toolbar (i.e. bold) it works absolutely perfect. Same with font, color, size, etc. But when no text is selected, the method is called, but nothing changes. No bold, no font, no nothing. I think this has something to do with how the focus leaves the bottom frame (editable) when the top frame is clicked. For some reason, when something is selected, it retains its focus long enough for the method to be called.
Why on earth is this happening, and is there a way to fix it? Is there some kind of function that allows multiple focus points? Somehow other similar editors get around this, but I can't sift through their jumbled code to any benefit.
Please do not tell me frames are outdated. I know. Frames provided me with a quick way to do exactly as I wanted.
Thanks in advanced.
Snib
<><