PDA

View Full Version : Design Mode Focus



phb5000
04-29-2007, 04:03 PM
Hi,

Im working on a simple text editor on a web page, and to do this im using a page that has the property "DesignMode" set to "on". This page is then put inside an iframe as the "editable region".

I have some controls that handle for example toggle bold, italic, etc using the document.execCommand on the iframes page.

However, when I click the commands (that are outside the iframes page) the focus is lost from the editable region.

Is there anyway to put to focus back onto the editable page that is in design mode inside the iframe?

Bob90
04-29-2007, 09:28 PM
Not that I can think off.

You are effectively focusing on a different page.

you may be able to access the selected text on the ifram through the DOM.

Maybe a mod knows.

Twey
04-29-2007, 09:58 PM
iframe.focus() ought to work.