js与Fckeditor的交互
2007年09月8日 | 11:11 下午分类:未分类 |
blog的编辑器用的是FckEditor
总体来说感觉还是很不错的
但有时需要用js来获取FckEditor中的值
直接用document.getElementById(‘fckeditor’).value是得不到的
正确的获取方法:
var oEditor = FCKeditorAPI.GetInstance(‘editor’) ;
alert(oEditor.GetXHTML(true));
js修改FckEdior的值:
var oEditor = FCKeditorAPI.GetInstance(‘editor’) ;
oEditor.SetHTML(‘新内容’);
alert(oEditor.GetXHTML(true));
更多相关内容见这里:
http://www.blogjava.net/itstarting/archive/2007/03/11/103142.html
ps.codeproject上的GmailUpload_demo.zip
转载时务必以超链接形式标明文章原始出处和作者信息。
回来就谈技术