Fijate así:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
<script>
function Init() {
document.getElementById('iView').contentWindow.document.designMode = "on";
}
function HacerNegrita() {
document.getElementById('iView').contentWindow.document.execCommand("bold", false, null);
return false;
}
function HacerCursiva() {
document.getElementById('iView').contentWindow.document.execCommand('italic', false, null);
return false;
}
function valorizarOculto(){
var edit=document.getElementById('iView').contentWindow.document || document.getElementById('iView').contentDocument;
var valor=edit.body.innerHTML;
document.getElementById("valorframe").value=valor;
setTimeout(function(){alert(document.getElementById("valorframe").value);},300);
}
</script>
</head>
<body onload="Init()">
<form action="?" method="post" onsubmit="valorizarOculto()">
<div>
<iframe id="iView" name="iview" runat ="server" style="width: 400px; height: 250px; background-color:#CCFFFF; border: 2px" frameborder="1" enableviewstate="true" allowtransparency="true" ></iframe>
<br />
<img src="borrarbasura.jpg" onclick="HacerNegrita()" alt="negrita"/>
<img src="actualizar.jpg" onclick="HacerCursiva()" alt="cursiva"/>
<input type="hidden" name="oculto" id="valorframe" />
</div>
<input name="enviar" type="submit" value="enviar" />
</form>
<?php echo stripslashes($_POST['oculto']); ?>
</body>
</html>