fckediter javascript事件函數(shù)代碼
更新時(shí)間:2009年12月09日 03:57:32 作者:
fckediter javascript事件函數(shù)代碼,另外fckeditor的可以擴(kuò)展性不錯(cuò),大家可以學(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 實(shí)現(xiàn)代碼高亮
有時(shí)會(huì)包含大量代碼,如果能在文章中高亮顯示代碼文章的可讀性肯定會(huì)好很多。2009-05-05
FckEditor 中文配置手冊(cè)詳細(xì)說(shuō)明
首先,FCKEDITOR的性能是非常好的,用戶(hù)只需很少的時(shí)間就可以載入FCKEDITOR所需文件.對(duì)于其他在線(xiàn)編輯器來(lái) 說(shuō),這幾乎是個(gè)很難解決的難題2009-05-05
Ueditor百度編輯器的Html模式自動(dòng)替換樣式的解決方法
百度的Ueditor編輯器出于安全性考慮,用戶(hù)在html模式下粘貼進(jìn)去的html文檔會(huì)自動(dòng)被去除樣式和轉(zhuǎn)義。雖然安全的,但是非常不方便。做一下修改把這個(gè)功能去掉,需要的朋友可以參考下2017-03-03
xhEditor 免費(fèi)的國(guó)產(chǎn)HTML在線(xiàn)編輯器
在線(xiàn)編輯器,CKeditor+CKfinder的組合是首選的,可惜CKfinder要收費(fèi),黃金搭檔只有1個(gè)是免費(fèi)的,又不想用回老版本,所以站長(zhǎng)只好另尋他路。2011-06-06
使用ZeroClipboard解決跨瀏覽器復(fù)制到剪貼板的問(wèn)題
Zero Clipboard 利用透明的Flash讓其漂浮在復(fù)制按鈕之上,這樣其實(shí)點(diǎn)擊的不是按鈕而是 Flash ,這樣將需要的內(nèi)容傳入Flash,再通過(guò)Flash的復(fù)制功能把傳入的內(nèi)容復(fù)制到剪貼板2014-06-06

