fckeditor 常用函数

  插入:

  

复制代码 代码如下:

  oEditor.FCKSelection.GetSelectedElement();

  oEditor.FCK.InsertHtml("<br />");

  

复制代码 代码如下:

  FCKCommands.RegisterCommand('htmlcode',new FCKDialogCommand( 'htmlcode', FCKLang.htmlcodeBtn, FCKPlugins.Items['htmlcode'].Path + 'fck_htmlcode.html', 500, 420 ) ) ;

  var ohtmlcode=new FCKToolbarButton('htmlcode',FCKLang.htmlcodeBtn);

  ohtmlcode.IconPath=FCKPlugins.Items['htmlcode'].Path+'htmlcode.GIF';

  FCKToolbarItems.RegisterItem('htmlcode',ohtmlcode);

  //创建用于所htmlcode操作的对象

  var FCKhtmlcode = new Object() ;

  // 这个添加的方法将在弹出窗口点击ok按钮时被调用。

  // 该方法将会接收从对话框中传来的值。

  FCKhtmlcode.Add = function(strtemp,str)

  {

  FCK.InsertHtml("["+str+"]<br>"+strtemp+"<br>[/"+str+"]") ;

  }