Dear all

I am developing a CMS which makes use of the MS proprietary CONTENTEDITABLE property, and wanted to apply something I had worked out as detailed in this thread:

forums.devshed.com/showthread.php?p=542587

With no CSS, the editor works well:


Code:
<style>
#textEditor {
	width: 500px;
	height: 300px;
	border: 1px solid black;
}
</style>
<div contenteditable="true" id="textEditor"></div>
Try typing a few paragraphs, and then clicking the cursor within one of the paragraphs you have typed and insert more text: everything works as it should.

However, I have run into a problem. When I try to apply a style to any of the tags which are generated within the editor, everything goes a bit mad:


Code:
<style>
<!--
#textEditor {
	width: 500px;
	height: 300px;
	border: 1px solid black;
}

#textEditor p {
	width: 20em;
}
-->
</style>
<div contenteditable="true" id="textEditor"></div>
Now try typing a few paragraphs, and try to insert more text within a paragraph you have already typed. Bedlam.

Anyone have any experience of working with this?

Thanks,

Tom