![图片[1]-帝国cms更换eshoweditor编辑器方法-HostJL-VPS主机交流](https://www.hostjl.com/wp-content/hctimg/20230610/84ee6849bc17bd63cbfcb21be19850bb281.jpg)
eshoweditor编辑器可以直接使用文档的图片,从本地电脑复制内容到帝国cms后台后图片就自动加载了,特别适合政府学校类编辑人员,他们有大量的文档图,换成eshoweditor编辑器可以减少工作量。购买eshoweditor编辑器后,还需要在帝国cms文件里修改一下代码,下面是青青模板网整理的解决方法,供大家学习参考:
![图片[2]-帝国cms更换eshoweditor编辑器方法-HostJL-VPS主机交流](https://www.hostjl.com/wp-content/hctimg/20230610/a60aa9daf6ffd15bfd03d05cff4c6fe4282.jpg)
只需要修改公用调用的地方,也就是e/admin/ecmseditor/eshoweditor.php 这个文件里的代码
![图片[3]-帝国cms更换eshoweditor编辑器方法-HostJL-VPS主机交流](https://www.hostjl.com/wp-content/hctimg/20230610/44c167fc91c3bc108fc5605899753f6f283.jpg)
![图片[4]-帝国cms更换eshoweditor编辑器方法-HostJL-VPS主机交流](https://www.hostjl.com/wp-content/hctimg/20230610/22601aa8afea244514deed5cb20775f1284.jpg)
注释的是原来的,下面是改后的。
完整代码:
<?php
//变量名,变量值,工具条模式,编辑器目录,高度,宽度,全页
function ECMS_ShowEditorVar($varname,$varvalue,$toolbar='full',$basepath='',$height='300',$width='100%',$fullpage=0){
global $eshoweditorhtml;
$toolbar=strtolower($toolbar);
if($varvalue)
{
$varvalue=ehtmlspecialchars($varvalue);
}
if(empty($basepath))
{
$basepath='ecmseditor/infoeditor/';
}
if(empty($height))
{
$height='300';
}
if(empty($width))
{
$width='100%';
}
$editorvars='';
if($fullpage==1)
{
$editorvars.="fullPage:true, ";
}
if($toolbar=='basic')
{
$editorvars.="toolbar:'basic', ";
}
if($eshoweditorhtml)
{
$editorvars.="startupMode:'source', ";
}
$editorvars.="width:'".$width."', height:'".$height."'";
// $echoeditor="
//CKEDITOR.replace('".$varname."',
//{
// ".$editorvars."
//});";
$echoeditor="
EWEBEDITOR.Replace('".$varname."',{style:'coolblue', width:'".$width."', height:'".$height."'});
";
return $echoeditor;
}
//返回加载JS文件
function ECMS_ShowEditorJS($basepath=''){
if(empty($basepath))
{
$basepath='ecmseditor/infoeditor/';
}
$addcs=ECMS_ReturnEditorCx();
//$loadjs=' ';
$loadjs=' ';
return $loadjs;
}
//附加参数
function ECMS_ReturnEditorCx(){
global $classid,$filepass,$id,$r,$enews,$ecms_hashur;
if($enews=='AddClass'||$enews=='EditClass')
{
$modtype=1;
}
elseif($enews=='AddZt'||$enews=='EditZt')
{
$modtype=2;
}
else
{
$modtype=0;
}
$classid=(int)$classid;
$filepass=(int)$filepass;
$id=(int)$id;
$modtype=(int)$modtype;
$str="&classid=$classid&filepass=$filepass&infoid=$id&modtype=$modtype&sinfo=1".$ecms_hashur['ehref'];
return $str;
}
//上传提示
function ECMS_PTEditorShowError($type,$error,$showstr,$add,$ecms=0){
?>
以上就是关于帝国cms使用教程中"帝国cms更换eshoweditor编辑器方法"的全部内容,如果有遇到帝国cms使用教程其他问题的,可以在评论留言,或者加微信咨询。
© 版权声明
THE END










暂无评论内容