473,383 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

contentEditable DIV & document.body

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.

Dec 7 '06 #1
1 2346
de*******@gmail.com wrote:
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.


--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Csaba2000 | last post by:
I am going nuts on this. Am I just blind, or is there some bug either in my code or IE? Nutshell version: I have a content editable div that is supposed to show its entry in red if it is not...
2
by: gboissiere | last post by:
Hello 'contentEditable' gurus, The example code below uses contentEditable to let the user edit the <div> element directly in their browser. Works also using designMode for the document. ...
1
by: trevordixon | last post by:
I have an DIV with the contentEditable attribute. How can I get the value of the content within that DIV after the user has edited it for further processing. I'd like to store the HTML code within...
2
by: Dung Ping | last post by:
I like to see following to happen: When typing a number of 1 to 4 immediately after an alphabetic letter, it would become corresponding superscript. But if the user leaves a space after the...
4
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know...
3
by: nAmYzArC | last post by:
Hello every1, I have a "<DIV" tag with contenteditable turned on. I am using this as an area that users can either paste or drag/drop text into. The text can come from other browser windows and of...
12
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b)...
1
by: dharshanav | last post by:
Hi All, Is there a way to make the Mozilla browser behave the same way as IE when using in the design mode? For IE: <div id="left_div" contenteditable="true" frameborder="no"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.