fckediter javascript事件函数代码
程序员文章站
2022-03-07 08:57:41
demo: function fckeditor_oncomplete( editorinstance ) { editorinstance.editordocument....
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();
}
}