FCKEditor几点使用心得
2009-10-27 12:00
316 查看
1、挂接事件,比如onkeydown事件,要在FCKeditor_OnComplete里实现:
function FCKeditor_OnComplete( editorInstance )
{
if (document.all) // IE
editorInstance.EditorDocument.attachEvent("onkeypress", FCKeditor_OnKeyup) ;
else// other browser
editorInstance.EditorDocument.addEventListener( 'onkeypress', FCKeditor_OnKeyup, true );
}
2、挂接后如果调用了fckeditor的SetHTML函数,则挂接事件会失效,要改用oEditor.EditorDocument.body.innerHTML来设置内容即可。
3、用window.event.keyCode只能取到null值,要用FCKeditorAPI.GetInstance('FCKeditor1').EditorWindow.event.keyCode。
4、按回车符后生成的是是<br>还是<p>由fckconfig.js文件里的FCKConfig.EnterMode/FCKConfig.ShiftEnterMode决定,也可动态设置但属性名不是FCKConfig,而是Config。
function FCKeditor_OnComplete( editorInstance )
{
if (document.all) // IE
editorInstance.EditorDocument.attachEvent("onkeypress", FCKeditor_OnKeyup) ;
else// other browser
editorInstance.EditorDocument.addEventListener( 'onkeypress', FCKeditor_OnKeyup, true );
}
2、挂接后如果调用了fckeditor的SetHTML函数,则挂接事件会失效,要改用oEditor.EditorDocument.body.innerHTML来设置内容即可。
3、用window.event.keyCode只能取到null值,要用FCKeditorAPI.GetInstance('FCKeditor1').EditorWindow.event.keyCode。
4、按回车符后生成的是是<br>还是<p>由fckconfig.js文件里的FCKConfig.EnterMode/FCKConfig.ShiftEnterMode决定,也可动态设置但属性名不是FCKConfig,而是Config。
相关文章推荐
- FCKEditor网页编辑器 几点使用心得
- FCKeditor的几点重要改进和使用心得,值得分享
- FCKeditor的几点重要改进和使用心得,值得分享
- FCKeditor的几点重要改进和使用心得
- FCKeditor的几点重要改进和使用心得,值得分享
- Pure MVC使用的几点心得
- 使用strcpy的几点心得
- FckEditor使用心得(转)
- FCKeditor 的使用心得
- linux下使用yum安装gcc的几点心得
- ASP.NET2.0 中使用文本编辑器FCKeditor的心得
- Pure MVC使用的几点心得(模式和使用误区)
- 关于android sqlite数据库使用的几点心得
- BlackBerry_JDE_PluginFull的几点使用心得
- FCKEditor在DNN中的心得使用(更新于2006-10-10)
- 关于struts:errors标签的几点使用心得和经验
- linux下使用yum安装gcc的几点心得
- linux下使用yum安装gcc的几点心得
- linux下使用yum安装gcc的几点心得
- document.write的几点使用心得