锁定老帖子 主题:在EXT中使用FCKEditor编辑器例子
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2008-05-15
大哥,确实取不到值啊
|
|
返回顶楼 | |
发表时间:2008-05-26
大哥,再给个能用的版本。
|
|
返回顶楼 | |
发表时间:2008-06-26
本人已经测试可行的代码
关键在于这几行代码 var oFCKeditor=FCKeditorAPI.GetInstance('code1'); oFCKeditor.UpdateLinkedField(); // alert(Ext.get("code1").dom.value); alert(FCKeditorAPI.GetInstance('code1').GetXHTML( true )); 这是最重要的生要的 oFCKeditor.UpdateLinkedField(); 这两句是等效的 alert(Ext.get("code1").dom.value); alert(FCKeditorAPI.GetInstance('code1').GetXHTML( true )); 下面是详尽例子 Ext.onReady( function (){ var top = new Ext.FormPanel({ labelAlign : 'top', frame : true, title : '在线编辑器', bodyStyle : 'padding:5px 5px 0', width : 600, items : [{ xtype:'textarea', //这是必须的 id : 'code1',//div节点,这里要挂接FCKeditor编辑器 fieldLabel : '请输入信息', height : 200, anchor : '98%' }], buttons: [{ text: 'Save', handler:Msg },{ text: 'Cancel' }] }); top.render(document.body); //构造函数指出了要挂接的DIV结点,前面的id指出 var oFCKeditor = new FCKeditor( 'code1',800,350 ) ; oFCKeditor.BasePath = "resources/fckeditor/" ; oFCKeditor.ToolbarSet = 'Default'; oFCKeditor.ReplaceTextarea() ; function Msg() { var oFCKeditor=FCKeditorAPI.GetInstance('code1'); oFCKeditor.UpdateLinkedField(); // alert(Ext.get("code1").dom.value); alert(FCKeditorAPI.GetInstance('code1').GetXHTML( true )); } }); |
|
返回顶楼 | |
发表时间:2008-07-28
你好,请问要在里面填加新的字体库该如何操作
|
|
返回顶楼 | |
发表时间:2008-10-23
嗯,后面的那段程序调通了,可以用。
|
|
返回顶楼 | |
发表时间:2008-10-23
FCKeditor is not defined
有这个错误要怎么改 |
|
返回顶楼 | |
发表时间:2008-11-03
对 这个样子重用性不强 如果需要多个EDITOR呢?
|
|
返回顶楼 | |