Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Areas</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" xmlns="">
<link rel="stylesheet" type="text/css" href="lib/ext//resources/css/ext-all.css" />
<style>
body { padding: 10px; font-family: Arial; font-size: 12pt;}
h1 { margin-bottom: 0.3em; }
h2 { margin-top: 1em }
ul { list-style: disc outside; padding-left: 1.5em; }
</style>
<script type="text/javascript" src="lib/ext/ext-base.js"></script>
<script type="text/javascript" src="lib/ext/ext-all.js"></script>
<script type="text/javascript" src="lib/ext/ux/miframe.js"></script>
<script type="text/javascript" src="lib/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="Ext.ux.TinyMCE.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
skin : "o2k7",
theme : "advanced",
editor_selector : "mceEditor",
//editor_deselector : "mceNoEditor",
plugins: "safari,pagebreak,style,layer,table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1 : "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,|",
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 : false,
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
width: 534 ,
height: 380
});
</script>
<script type="text/javascript">
Ext.onReady(function(){
Ext.QuickTips.init();
var preview = function(){
var nm_1 = Ext.getCmp('nm').getValue();
var pl_1 = Ext.getCmp('pl').getValue();
var bio_1 = Ext.getCmp('richText').getValue();
// alert(Ext.getCmp('richText').getValue());
alert(bio_1);
var form1 = new Ext.form.FormPanel({
width: 800,
bodyStyle:'padding:5px 5px 0',
autoScroll:true,
frame:true,
defaultType: 'textfield',
items: [{
fieldLabel: 'Name',
name: 'name1',
id:'name1',
value:nm_1,
width:200,
readOnly:true
},{
fieldLabel: 'Place',
name: 'place',
id:'place1',
value:pl_1,
width:200,
readOnly:true
},{
xtype: 'tinymce',
fieldLabel: "Rich text",
id:'textarea1',
name:'textarea1',
width: 200,
height: 200,
value: bio_1,
tinymceSettings: {
theme : "advanced",
plugins: " "//,
//theme_advanced_buttons1 : "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,|",
//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_toolbar:false,
//theme_advanced_statusbar_location : "bottom",
//theme_advanced_resizing : false,
//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]",
//template_external_list_url : "example_template_list.js"
}
}
]
});
if(!win){
var win = new Ext.Window({
el:'win',
layout:'fit',
width:400,
height:400,
closable: true,
closeAction:'hide',
minimizable:true,
resizable:true,
plain: true,
items: [form1]
});
}
win.show();
};
var form = new Ext.form.FormPanel({
width: 800,
//height:500,
bodyStyle:'padding:5px 5px 0',
autoScroll:true,
frame:true,
defaultType: 'textfield',
items: [{
fieldLabel: 'Name',
name: 'nm',
id:'nm',
width:200,
value: 'Jack',
readOnly:true
},{
fieldLabel: 'Place',
name: 'pl',
id:'pl',
width:200,
value: 'India',
readOnly:true
},{
xtype: 'tinymce',
fieldLabel: "Rich text",
id: "richText",
name: "richText",
width: 600,
height: 400,
tinymceSettings: {
theme : "advanced",
plugins: "safari,pagebreak,style,layer,table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1 : "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,|",
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 : false,
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]",
template_external_list_url : "example_template_list.js"
}
}
],
buttonAlign :'center',
buttons: [{
text:'PreView',
handler:preview
}]
});
form.render(document.body);
});
</script>
</head>
<body>
<!--<script type="text/javascript" src="js/examples.js"></script>-->
<h2>Editor</h2>
<div id="win" class="x-hidden"></div>
</body>
</html>
please check it and give me some idea