contentEditable DIV & document.body

D

delraydog

Does a contentEditable DIV have the notion of an internal document? I'm
trying to convert code that uses an IFrame.contentWindow.document to
use the "document" inside a contentEditable DIV but they don't seem to
be similar beasts. Eventually I want to add stylesheets to the
contentEditable DIV as well as event handling. I'm porting an IFrame
editor to a contentEditable DIV based editor.

Thanks,
Cliff.
 
M

Martin Honnen

Does a contentEditable DIV have the notion of an internal document? I'm
trying to convert code that uses an IFrame.contentWindow.document to
use the "document" inside a contentEditable DIV but they don't seem to
be similar beasts. Eventually I want to add stylesheets to the
contentEditable DIV as well as event handling. I'm porting an IFrame
editor to a contentEditable DIV based editor.

The div sits in a document and is then made editable. It does not
contain a document of its own to which you could apply separate
stylesheets. If you want to apply stylesheets then to the document the
div sits in, perhaps using CSS classes to be only applied to that
editable div.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top