给 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. Vilem 的头像

    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. DearTanker 的头像
      DearTanker

      sorry,i can’t understand you :cry:

发表回复

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