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

(编辑:jimmy 日期: 2024/10/5 浏览:2)

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。

一句话新闻

微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。