hi,
please tell me how to download tinymce editor .
i want to download the below tinymce editor
http://tinymce.moxiecode.com/example_full.php

You can download tinymce editor from the url you have provided. Here is an example how you can use it.

<?php
if(isset($_POST['submit'])) {
	print_r($_POST);
}
?>
<!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" xml:lang="en" lang="en"><head>
	<script language="javascript" type="text/javascript" src="./tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
	mode : "textareas",
	theme : "advanced",
	plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu",
	theme_advanced_buttons1_add_before : "save,separator",
	theme_advanced_buttons1_add : "fontselect,fontsizeselect",
	theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
	theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
	theme_advanced_buttons3_add_before : "tablecontrols,separator",
	theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_path_location : "bottom",
	plugin_insertdate_dateFormat : "%Y-%m-%d",
	plugin_insertdate_timeFormat : "%H:%M:%S",
	extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
	external_link_list_url : "example_data/example_link_list.js",
	external_image_list_url : "example_data/example_image_list.js",
	flash_external_list_url : "example_data/example_flash_list.js"
});
</script>
</head>
<body>
<form method="post" action="test.php">
<textarea name="description" cols="100" rows="27"></textarea>
<input type="submit" name="submit" value="submit" />
</form>
</body>
</html>

Copy this code and call it test.php . Don't forget to give the right path for tiny_mce.js :)

ya did that but i got only a text area and a submit buuton

ya did that but i got only a text area and a submit buuton

Check if the path you specify in scr=..../tiny_mce.js is correct.

please specify the page

hi
in my ftp
public_html/tinymce/jscripts/tiny_mce/tiny_mce.js
i have the below path as

<script language="javascript" type="text/javascript" src="./tiny_mce/tiny_mce.js"></script>

In the above example, test.php , we have this line.

<script language="javascript" type="text/javascript" src="./tiny_mce/tiny_mce.js"></script>

Check if tiny_mce.js exists in the above path. If the file (tiny_mce.js) doesn't exist in the path specified, specify the right path.
./tinymce/jscripts/tiny_mce/tiny_mce.js thats the path in the latest tiny_mce version.

hi
in my ftp
public_html/tinymce/jscripts/tiny_mce/tiny_mce.js
i have the below path as

<script language="javascript" type="text/javascript" src="./tiny_mce/tiny_mce.js"></script>

As you can see, you have the wrong path in src. :)

its not working

should i change anything else other than this

tinymce

Okay ! I have attached a working copy of the editor. Check it and tell us if you still have problems!

hi,
thanks a lot.its working i just want to know whether i can add fields in the same page

Yes you can. Just keep it within the form tag.

hi data is getting inserted on page load itself

<?php
if(isset($_POST['submit'])) {

//print_r($_POST);

$des=$_REQUEST['description'];


$tomorrow = mktime(0,0,0,date("m"),date("d"),date("Y")); 
$day=date("Y/m/d", $tomorrow); 
$time_now=mktime(date('h'),date('i'),date('s')); 
$time=date('h:i:s A',$time_now);
$title=$_REQUEST['title'];
mysql_query("INSERT INTO article(ar_title,ar_desc)values('$title','$des')") or die("ERROR:".mysql_error());
echo "Thanks";
}

?>

<!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" xml:lang="en" lang="en"><head>

    <script language="javascript" type="text/javascript" src="./tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

<script language="javascript" type="text/javascript">

tinyMCE.init({
    mode : "textareas",
    theme : "advanced",

    plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu",

    theme_advanced_buttons1_add_before : "save,separator",
    theme_advanced_buttons1_add : "fontselect,fontsizeselect",

    theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",

    theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",

theme_advanced_buttons3_add_before : "tablecontrols,separator",

    theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print",
    theme_advanced_toolbar_location : "top",

    theme_advanced_toolbar_align : "left",
    theme_advanced_path_location : "bottom",
    plugin_insertdate_dateFormat : "%Y-%m-%d",

    plugin_insertdate_timeFormat : "%H:%M:%S",

    extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",

    external_link_list_url : "example_data/example_link_list.js",

    external_image_list_url : "example_data/example_image_list.js",

    flash_external_list_url : "example_data/example_flash_list.js"
});


</script>
</head>
<body>
<form method="post" action="test.php">

<input type="text" name="title">
<textarea name="description" cols="100" rows="27"></textarea>
<input type="submit" name="submit" value="submit" />
</form>
</body></html>

I don't think so. uncomment print_r($_POST) and see if it shows any data on page load.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.