给 MediaWiki 1.91.1 安装 CKEditor 3.6.4(原FCKEditor)

来源:http://www.mwusers.com/forums/showthread.php?16957-CKEditor-with-MediaWiki

在LocalSettings.php中添加:

require_once("$IP/extensions/ckeditor/ckeditor.php");
$wgHooks['EditPage::showEditForm:initial'][] = 'showEditForm'; 
function showEditForm($form)
{ 
    global $wgOut; 
    $wgOut->addScriptFile( '/extensions/ckeditor/ckeditor.js' ); 
    $script = "<script type="text/javascript"> window.onload = function() 
   { 
    CKEDITOR.replace( 'wpTextbox1' ); }; 
    if ( window.removeEventListener ) window.removeEventListener( 'load', mwSetupToolbar, false ) ; 
     else if ( window.detachEvent ) window.detachEvent( 'onload', mwSetupToolbar ) ; </script>"; 
$wgOut->addHTML($script); return true; 
}

 


评论

《 “给 MediaWiki 1.91.1 安装 CKEditor 3.6.4(原FCKEditor)” 》 有 2 条评论

  1. Just made an illustration for the new CKEditor in Isaak/Sakai in Illustrator, but had to use Jing at the end for constancy of arrows

    1. sorry,i can’t understand you :cry:

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注