fckediter javascript事件函數(shù)代碼
更新時間:2009年12月09日 03:57:32 作者:
fckediter javascript事件函數(shù)代碼,另外fckeditor的可以擴展性不錯,大家可以學(xué)習(xí)下,具體的代碼,可以參考腳本之家以前發(fā)布的文章。
demo:
function FCKeditor_OnComplete( editorInstance )
{
editorInstance.EditorDocument.attachEvent("onkeydown", editor_keydown);
editorInstance.EditorDocument.attachEvent("onkeyup", editor_keyup);
}
function editor_keydown()
{
var oEditor = FCKeditorAPI.GetInstance('inputmsg') ;
var keycode = oEditor.EditorWindow.event.keyCode;
if(keycode==13) {
}
}
function clearInput()
{
var oEditor = FCKeditorAPI.GetInstance('inputmsg') ;
oEditor.Commands.GetCommand( "NewPage" ).Execute(); // oEditor.SetHTML("") ;
}
function editor_keyup()
{
var oEditor = FCKeditorAPI.GetInstance('inputmsg') ;
var keycode = oEditor.EditorWindow.event.keyCode;
if(keycode==13) {
clearInput();
}
}
function FCKeditor_OnComplete( editorInstance )
{
editorInstance.EditorDocument.attachEvent("onkeydown", editor_keydown);
editorInstance.EditorDocument.attachEvent("onkeyup", editor_keyup);
}
function editor_keydown()
{
var oEditor = FCKeditorAPI.GetInstance('inputmsg') ;
var keycode = oEditor.EditorWindow.event.keyCode;
if(keycode==13) {
}
}
function clearInput()
{
var oEditor = FCKeditorAPI.GetInstance('inputmsg') ;
oEditor.Commands.GetCommand( "NewPage" ).Execute(); // oEditor.SetHTML("") ;
}
function editor_keyup()
{
var oEditor = FCKeditorAPI.GetInstance('inputmsg') ;
var keycode = oEditor.EditorWindow.event.keyCode;
if(keycode==13) {
clearInput();
}
}
相關(guān)文章
Windows Live Writer 實現(xiàn)代碼高亮
有時會包含大量代碼,如果能在文章中高亮顯示代碼文章的可讀性肯定會好很多。2009-05-05
Ueditor百度編輯器的Html模式自動替換樣式的解決方法
百度的Ueditor編輯器出于安全性考慮,用戶在html模式下粘貼進去的html文檔會自動被去除樣式和轉(zhuǎn)義。雖然安全的,但是非常不方便。做一下修改把這個功能去掉,需要的朋友可以參考下2017-03-03
使用ZeroClipboard解決跨瀏覽器復(fù)制到剪貼板的問題
Zero Clipboard 利用透明的Flash讓其漂浮在復(fù)制按鈕之上,這樣其實點擊的不是按鈕而是 Flash ,這樣將需要的內(nèi)容傳入Flash,再通過Flash的復(fù)制功能把傳入的內(nèi)容復(fù)制到剪貼板2014-06-06

