[转]ExtJs里使用FckEditor
来源:互联网 发布:淘宝网韩版女装新款 编辑:程序博客网 时间:2024/05/01 18:22
[转]ExtJs里使用FckEditor
原贴见:
http://ext.group.javaeye.com/group/post/37548
http://extjs.com/forum/showthread.php?t=17423
Ext.onReady(function() {
var fckFormObj = new Ext.FormPanel({
labelWidth:75,
url:"",
title:"EXT/FCKEditor 集成 -- vb2005xu | cdlinux.ys168.com",
bodyStyle:"padding:5px 5px 0",
defaultType:"form",
buttons:[
{
text:"Save" ,
type:'submit',
handler: function(){
//获取fckeditor内容赋给textarea
Ext.get('fckInstance').dom.value = "jjj";//fckobj.GetXHTML(true) + '提交后';
Ext.MessageBox.alert('FCK内容',Ext.get('fckInstance').dom.value);
if (fckFormObj.form.isValid())
{
//创建响应测试函数
var fckobj_temp = FCKeditorAPI.GetInstance('fckInstance');
//fckobj_temp.UpdateLinkedField();//此方法被绑定到submit事件
fckFormObj.form.doAction('submit',{
url:'submit.php',
method:'post',
waitMsg:'正在提交,请稍等',
success:function(form,action){//成功
showInfo('Success',fckobj_temp.GetXHTML(true));
} ,
failure:function(form,action){//失败
showInfo('Failed','网络中断造成连接失败');
}
});
}
}
},
{
text:"Cancel"
}
],
items:[{
xtype:"textarea",
fieldLabel:"编辑",
labelSeparator:":",
id:"fckInstance", //div节点,这里要挂接FCKeditor编辑器
name:"fckInstance",
width:736,
height:371
}]
});
fckFormObj.render(document.body);
/*创建Fckeditor对象 -- 构造函数指出了Fckeditor要挂接的id,上文中的xtype : 'textarea'指定*/
//在页面上要求挂载fckeditor/fckeditor.js文件
var fckobj = new FCKeditor('fckInstance',810,350);
fckobj.BasePath = "/ucren/fckeditor/" ;
fckobj.ToolbarSet = 'Default' ;
fckobj.ReplaceTextarea();
//创建响应测试函数
function msgBox()
{
var fckobj_temp = FCKeditorAPI.GetInstance('fckInstance');
fckobj_temp.UpdateLinkedField();//此方法被绑定到submit事件
Ext.MessageBox.alert('FCK内容',fckobj_temp.GetXHTML( true ));
}
function showInfo(tip,str){
var win = new Ext.Window({
title: '信息提交应答提示 -- ' + tip,
width: 400 , height: 200 ,autoScroll: true ,
html: '<h1>'+ str +'</h1>'
});
win.show();
}
});
- [转]ExtJs里使用FckEditor
- [转]ExtJs里使用FckEditor
- [转]ExtJs里使用FckEditor
- extjs弹出框使用fckeditor
- FckEditor在Extjs中的使用
- php里如何使用fckeditor
- 项目里使用Extjs
- 项目里使用Extjs(二)
- FCKeditor使用详解(转)
- Spring Extjs FCKEditor的集成
- FCKeditor使用
- FCKEditor 使用
- FCKeditor使用
- 使用Fckeditor
- 最新FCKeditor 精简配置(FCKeditor配置使用)
- Fckeditor的使用--Fckeditor对象的属性
- FCKeditor 配置使用 JS获取FCKeditor内容
- 基于java使用FCKeditor
- 高级.net工程师必备
- 9个javascript图形列表
- fedora中将程序的快捷方式添加到“应用程序”中的方法
- 没有线的电路板:在纳米级用光传输数据
- HTML编辑器FCKeditor使用详解
- [转]ExtJs里使用FckEditor
- 中央美术学院宿舍发生火灾1人受伤
- 妈妈:我被北外强制退学了。
- 虚拟化技术-指令集虚拟化
- Spring MVC完成指南(三)国际化的支持
- xfire实现webservice时的权限控制
- 我的团长我的团
- test
- 医疗保险手册详解