用fckeditor替换moodle默认的编辑器

用fckeditor替换moodle默认的编辑器

ID:15874151

大小:49.00 KB

页数:3页

时间:2018-08-06

用fckeditor替换moodle默认的编辑器_第1页
用fckeditor替换moodle默认的编辑器_第2页
用fckeditor替换moodle默认的编辑器_第3页
资源描述:

《用fckeditor替换moodle默认的编辑器》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、用FCKeditor替换Moodle默认的编辑器作者:柏霖日期:2009-07-11字体大小:小中大0.先下载FCK编辑器哦,目前最新的是2.6.4.1版本下载FCKeditor2.6.4.11.将下载的压缩包解压到moodle文件夹下的"libeditor"内,并重命名为"fckeditor"2.返回上层"lib"目录,找到"weblib.php",复制一份命名为"weblib_bak.php"作为备份。3.打开"weblib.php",ctrl+f查找"print_textarea",将整段方法替换为下面的内容后保存:复制内容到剪贴板程序代码print_textarea($us

2、ehtmleditor,$rows,$cols,$width,$height,$name,$value='',$courseid=0,$return=false){///$widthandheightarelegacyfieldsandnolongerusedaspixelsliketheyusedtobe.///However,youcansetthemtozerotooverridethemincolsandminrowsvaluesbelow.    global$CFG,$course;    static$count;//Forloadingthehtmlareaonlyo

3、nce.    if(empty($courseid)){        if(!empty($course->id)){//searchforitinglobalcontext            $courseid=$course->id;        }    }    if(empty($count)){        $count=0;    }    if($usehtmleditor){        if(!empty($courseid)andisteacher($courseid)){            $strFck=($count<1)?'

4、"text/java"src="'.$CFG->wwwroot.'/lib/editor/fckeditor/fckeditor.js">'."":'';        }else{            $strFck=($count<1)?''."":'';        }        $count++;        if($height){//Usuallywithlegacycalls         

5、   if($rows<$minrows){                $rows=$minrows;            }        }                if($width){//Usuallywithlegacycalls            if($cols<$mincols){                $cols=$mincols;            }        }    }        $strFck.='

6、ows.'"cols="'.$cols.'">';    $strFck.=$value;    $strFck.=''."";    $strFck.='        varoFCKeditor_'.$count.'=newFCKeditor("'.$name.'_'.$count.'");            oFCKeditor_'.$count.'.BasePath="'.$CFG->wwwroot.'/lib/editor/fckeditor/";            oFCKed

7、itor_'.$count.'.Height    =400;            oFCKeditor_'.$count.'.Width    =700;            oFCKeditor_'.$count.'.ReplaceTextarea();        ';                    if($return){        return$strFck;    }    echo$strFck;}4.进入"libe

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。