源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

FCKEditor网页编辑器 几点使用心得

  • 时间:2021-12-02 13:19 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:FCKEditor网页编辑器 几点使用心得
1、挂接事件,比如onkeydown事件,要在FCKeditor_OnComplete里实现:
[u]复制代码[/u] 代码如下:
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。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部