It seems I cannot set designMode to on, if I create the iframe on the fly.
This code won't work. It creates iframe, displays contents but designMode cannot be turned on:
HTML Code:
<style type="text/css">
#message {
	width:500px;
	height:200px;
}

</style>
<script language="javascript" type="text/javascript">
function create(){
	var iframe = document.createElement("iframe")
	iframe.setAttribute("id","message");
	iframe.setAttribute("src","loremipsum.html");	
	
	document.getElementById("container").appendChild(iframe);
	
	iframe.contentDocument.designMode="on";
}
</script>
<body>
<div id="container">
<input name="" type="button" value="Hit" onclick="create()"><br />

</div>
</body>
However, this works:
HTML Code:
<script language="javascript" type="text/javascript">
function change(id) {
	var el = document.getElementById(id);
	el.contentDocument.designMode = "on";	
}
</script>
<body>
<iframe src="loremipsum.html" width="500" height="200" id="frame"></iframe><br />

<input name="" type="button" value="Hit" onclick="change('frame')">
</body>
Only difference is, iframe is created by JS in the first example, but it is hardcoded in second.

Is this a known bug? Or any solutions for this?

Regards.