Full featured Example
1<%@ page language= "Java"Import= "java.util.*" pageencoding= "UTF-8"%>2<%3String Path =Request.getcontextpath ();4String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";5%>6 7<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >89Ten<script type= "Text/javascript" src= "<%=path%>/tinymce/jscripts/tiny_mce/tiny_mce.js" ></script> One<script type= "Text/javascript" > A Tinymce.init ({ - //General Options -Mode: "Textareas", theTheme: "Advanced", -Plugins: "Autolink,lists,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,wordcount,advlist,autosave,visualblocks ", - - //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 ", ATHEME_ADVANCED_BUTTONS4: "Insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del, Ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks ", atTheme_advanced_toolbar_location: "Top", -Theme_advanced_toolbar_align: "Left", -Theme_advanced_statusbar_location: "Bottom", -Theme_advanced_resizing:true, - - //Example content css (should be your site CSS) inCONTENT_CSS: "Css/content.css", - to //Drop lists for link/image/media/template dialogs +Template_external_list_url: "Lists/template_list.js", -External_link_list_url: "Lists/link_list.js", theExternal_image_list_url: "Lists/image_list.js", *Media_external_list_url: "Lists/media_list.js", $ Panax Notoginseng //Style Formats - style_formats: [ the{title: ' Bold text ', inline: ' B '}, +{title: ' Red text ', inline: ' span ', styles: {color: ' #ff0000 '}}, A{title: ' Red header ', Block: ' H1 ', styles: {color: ' #ff0000 '}}, the{title: ' Example 1 ', inline: ' span ', classes: ' Example1 '}, +{title: ' Example 2 ', inline: ' span ', classes: ' Example2 '}, -{title: ' Table Styles '}, ${title: ' Table row 1 ', selector: ' tr ', classes: ' Tablerow1 '} $ ], - - //Replace values for the template plugin the template_replace_values: { -Username: "Some User",WuyiStaffID: "991234" the } - }); Wu</script> - About<body> $<form method= "POST" action= "${pagecontext.request.contextpath}/demoservlet" > - -<!--Gets replaced with TinyMCE, remember HTML in a TEXTAREA should be encoded- -<textarea id= "elm1" name= "elm1" rows= "cols=", "style=" > AThis is some example text so you can edit inside the <strong> TinyMCE editor</strong>. +</textarea> the<br/> -<input type= "Submit" Name= "Save" value= "Submit"/> $<input type= "reset" name= "reset" value= "reset"/> the</form> the</body> theTinyMCE (b)