Setup TinyMCE Editor

TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor. I used here version.lets see how add this editor to an application. first download it and unzipped it and put it in your web application’s js folder. so the folder structure looks –


I used one configaration file that initialize the TinyMCE editor. this file name is initTinyMCE.js. put this folder into webappjstiny_mce folder.

——————–  initTinyMCE.js

theme : “advanced”,
mode : “textareas”,
plugins : “searchreplace,print,paste”,
entities : “",34, ,160,&,38,¢,162,€,8364,£,163,¥,165,©,169,®,174,™,8482,‰,8240,<,60,>,62,≤,8804,≥,8805,°,176,−,8722”,
theme_advanced_buttons1 : “print,search,replace,separator,undo,redo”,
theme_advanced_buttons2: “”,
theme_advanced_buttons3 : “”,
theme_advanced_toolbar_location : “top”,
theme_advanced_toolbar_align : “left”,
theme_advanced_path_location : “bottom”,
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]”,
theme_advanced_resize_horizontal : true,
theme_advanced_resizing : true,
nonbreaking_force_tab : false,
apply_source_formatting : false,
width : 300,
debug : false,
//handle_event_callback : “myHandleEvent”,
cleanup : true,
theme_advanced_path : false,

here i used entities value so that it returns the actual character. there are so many plugins and button i used only some plugins of them. the ‘TinyMCE test.html’ looks like –

——————— TinyMCE Test.html

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “”>
<meta content=”text/html; charset=ISO-8859-1″ http-equiv=”content-type”>
<title>TinyMCE Test</title>

<script type=”text/javascript” src=”js/tiny_mce/tiny_mce.js”></script>
<script type=”text/javascript” src=”js/tiny_mce/initTinyMCE.js”></script>

<table width=”100%”>
<td align=”center”>
<textarea id=”txtNote1″ name=”txtNote1″ rows=”7″ cols=”10″ >
This is Text1.
<td align=”center”>
<textarea id=”txtNote2″ name=”txtNote2″ rows=”7″ cols=”10″ >
This is Text2.


the TinyMCE test.html page looks like –


3 thoughts on “Setup TinyMCE Editor

Leave a Reply

Your email address will not be published. Required fields are marked *