Jump to content

Toolbar that is integrateable to a form in PHP


tmyonline

Recommended Posts

Hi guys:

 

I'm looking for a free WYSIWYG editor that can be integrated to a PHP page inside a form.  Basically, I developed a contact form so that users can type in their messages, much like this phpfreak form that I'm using to type this message.  I want to integrate a tool bar into my form so that users can bold, italize, underline, indent, and quote text, select font type and font size, create order lists, display smilies,...  Is there a free toolbar with these features that I can integrate to my PHP form ?  Many thanks.

Link to comment
Share on other sites

TinyMCE - http://tinymce.moxiecode.com/ Best thing i've ever used... and free. It basically changes a <textarea> into what your looking for.

 

<html>
<head>
<script language="javascript" type="text/javascript" src="../includes/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
	// General options
	mode : "textareas",
	theme : "advanced",
	plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

	// Theme options
	theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
	theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
	theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
	theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,

	// Drop lists for link/image/media/template dialogs
	template_external_list_url : "../includes/tinymce/examples/lists/template_list.js",
	external_link_list_url : "../includes/tinymce/examples/lists/link_list.js",
	external_image_list_url : "../includes/tinymce/examples/lists/image_list.js",
	media_external_list_url : "../includes/tinymce/examples/lists/media_list.js",});
</script>
</head>

<body>

<div style="text-align: center; font-weight: bold; font-size: 14px;">Edit page</div>
	<form action="edit_page.php" class="edit_page" method="post">
		<h3>Title</h3><input type="text" class="edit_name" name="page_name" size="15" maxlength="15" value="' . $row[0] . '" />
		<br /><br />
		<textarea name="content" class="edit_content">' . $row[1] . '</textarea><br />
		<p>Last Edited By: ' . $row['2'] . '</p>
		<input type="submit" name="submit" value="Submit" />
		<input type="hidden" name="submitted" value="TRUE" />
		<input type="hidden" name="id" value="' . $id . '" />
	</form>
</body>
<html>

 

The example above, will create an advanced form for editing in the <textarea name="content" class="edit_content">' . $row[1] . '</textarea><br /> field.

 

PM for more help if ya need.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.