0

Currently I am working on sending/editing email using ckEditor

This is the view of my website

enter image description here

What I am thinking is

have email form -> edit email form with ckEditor -> send 'ckEditor' edited email

enter image description here

I've seen other people sending email but I could not find people using 'ckEditor' to edit email and send at the same time.

Main questions are

  • How do I edit+save 'email form' and 'ckEditor'?
  • How to include 'email form' to 'send email'?

(I am currently using $mailbody to list the email with html)

Frank Bryce
  • 8,076
  • 4
  • 38
  • 56
Danny Yoon
  • 27
  • 10

1 Answers1

1

give this a throw:

<html>
<head>
<title>Comment Form from FCKeditor - Sample</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="noindex, nofollow" name="robots">
<link href="../sample.css" rel="stylesheet" type="text/css"><!--insert correct path to the file on your server-->
<script src="../../fckeditor.js" type="text/javascript"></script><!--insert correct path to the file on your server-->
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<form action="mailto:mail@mail.com?subject=New Comment" method="post" name="form1"><!--insert correct path to your email-->
<table border="0" cellpadding="4" cellspacing="2" width="90%">
<tr valign="top">
<td bgcolor="#CCCCCC">Title</td>
</tr>
<tr valign="top">
<td></td>
</tr>
<tr valign="top">
<td>
<p>Name:<br><input name="textfield1" size="50" type="text"> </p>
<p>Email:<br><input name="textfield2" size="50" type="text"> </p>
<p>Subject:<br><input name="textfield3" size="50" type="text"> </p>
<p>Question or Comment:<br>
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ;    // '/fckeditor/' is the default value.
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Height   = 300 ;
oFCKeditor.Value    = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
oFCKeditor.Create() ;
//-->
</script>
<br></p>
</td>
</tr>
<tr valign="top">
<td><input name="Submit" type="submit" value="Submit"> </td>
</tr>
</table>
</form>
</body>
</html>

update the form action as necessary. Cheers

arcee123
  • 101
  • 9
  • 41
  • 118
  • I have worked on html which has email subject and body before. Thanks for the help but I need to have a page where you can edit html and save it. Sending email is different part – Danny Yoon Dec 30 '15 at 21:15
  • how about splitting the steps. In client, update "html" in fckeditor, and send action. The action will update a record in a database, then send the html String in an email body using server-side? – arcee123 Dec 30 '15 at 21:17
  • here's an example of updating a database using in-line fckeditor: http://stackoverflow.com/questions/13625434/save-data-to-php-mysql-with-inline-edit-in-ckeditor – arcee123 Dec 30 '15 at 21:20