Hola amigos:
Estoy trabajando desde una pagina que tiene un editor del tipo WYSIWYG que permite enriquecer los textos, y desde esta página envio a un script que me lo procesa y envia los datos a un mail en formato html.
Llega en html pero no me toma la tipografia ni los vinculos a las images etc. Si me respeta tamaño, color.
Pongo 1) donde llamo a editor y 2) el script que procesa y envia, no se donde estan los errores, puede haber mas de uno....GRACIAS!!!
1) Pagina que llama al editor .js
Código:
<html>
<head>
<title>JS-RichEdit and PHP</title>
<style> <!--
BODY, P, SPAN, DIV, TABLE, TD, TH, UL, OL, LI {
font-family: Arial, Helvetica;
font-size: 14px;
color: black;
}
.content {
width: 96%;
margin-top: 10px;
margin-bottom: 10px;
padding: 10px;
background-color: #F6FAFE;
border: 1px solid #A0C0E0;
overflow: auto;
}
.code {
font-family: Courier New, Monospace;
font-size: 12px;
margin: 10px;
padding: 0px;
color: blue;
}
--> </style>
</head>
<body marginwidth=10 marginheight=10 topmargin=10 leftmargin=10>
<?
// if register_globals is off:
if(!isset($richEdit0)) $richEdit0 = $_REQUEST['richEdit0'];
if($richEdit0) {
$richEdit0 = stripslashes($richEdit0);
?> <font face="Arial, Helvetica, sans-serif" size="2">Submitted content: </font>
<div class="content"> <? echo $richEdit0; ?> </div>
<?
}
?>
<script language="JavaScript" src="richedit.js"></script>
<form name="f1" action="procesar.php" method=post>
<script language="JavaScript"> <!--
var editor = new EDITOR();
<?
$richEdit0 = addslashes(preg_replace("/\r|\n/", '', $richEdit0));
?>
editor.create("<? echo $richEdit0; ?>");
//--> </script>
<br>
<input type=submit value="Submit" onClick="rtoStore()">
</form>
</body>
</html>
2) Pagina que procesa y envia
Código:
<?
$para = "[email protected]";
$tema ="Prueba desde web";
$richEdit0 = stripslashes($_POST['richEdit0']);
$richEdit0 = addslashes(preg_replace("/\r|\n/", '', $richEdit0));
$cabeceras = "Content-Type: text/html; charset=iso-8859-1\r\n" ;
$cabeceras .= "Mime-Version: 1.0\n";
$cabeceras .= "From: [email protected]";
mail ($para, $tema, $richEdit0, $cabeceras);
?>