替换表单HTML代码
填入代码
<?php
$ziduan='newstext';//编辑器使用的字段名称
if($enews=='MAddInfo' || $enews=='MEditInfo'){//前台投稿
$qiantai=1;
$ziduanzhi=$ecmsfirstpost==1?"":DoReqValue($mid,$ziduan,stripSlashes($r[$ziduan]));
}else{//后台
$qiantai=0;
$ziduanzhi=$ecmsfirstpost==1?"":stripSlashes($r[$ziduan]);
}
?>
<script>var classid='<?=$classid?>',infoid='<?=$id?>',Filepass='<?=$filepass?>',ehash='<?=$ecms_hashur[ehref]?>',qiantai='<?=$qiantai?>';//把参数传给编辑器,增加支持7.2版本的金刚模式</script>
<script type="text/javascript"charset="utf-8"src="<?=$public_r['newsurl']?>e/extend/ueditor/ueditor.config.js"></script>
<script type="text/javascript"charset="utf-8"src="<?=$public_r['newsurl']?>e/extend/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript"charset="utf-8"src="<?=$public_r['newsurl']?>e/extend/ueditor/ueditor.toolbarconfig.js"></script>
<!--wordpaster begin-->
<link type="text/css"rel="Stylesheet"href="<?= $public_r['newsurl'] ?>e/extend/WordPaster/css/w.css"/>
<link type="text/css"rel="Stylesheet"href="<?= $public_r['newsurl'] ?>e/extend/WordPaster/js/skygqbox.css" />
<script type="text/javascript"src="<?= $public_r['newsurl'] ?>e/extend/WordPaster/js/json2.min.js"charset="utf-8"></script>
<script type="text/javascript"src="<?= $public_r['newsurl'] ?>e/extend/WordPaster/js/jquery-1.4.min.js"charset="utf-8"></script>
<script type="text/javascript"src="<?= $public_r['newsurl'] ?>e/extend/WordPaster/js/skygqbox.js"charset="utf-8"></script>
<script type="text/javascript"src="<?= $public_r['newsurl'] ?>e/extend/WordPaster/js/w.edge.js"charset="utf-8"></script>
<script type="text/javascript"src="<?= $public_r['newsurl'] ?>e/extend/WordPaster/js/w.app.js"charset="utf-8"></script>
<script type="text/javascript"src="<?= $public_r['newsurl'] ?>e/extend/WordPaster/js/w.file.js"charset="utf-8"></script>
<script type="text/javascript"src="<?= $public_r['newsurl'] ?>e/extend/WordPaster/js/w.js"charset="utf-8"></script>
<!--wordpaster end-->
<textarea id="<?=$ziduan?>"name="<?=$ziduan?>"><?=$ziduanzhi?></textarea>
<div id="wdpst"></div>
<script type="text/javascript">
var pos= window.location.href.indexOf("/e/admin");
var website= window.location.href.substr(0, pos);
WordPaster.getInstance({
//上传接口:http://www.ncmem.com/doc/view.aspx?id=d88b60a2b0204af1ba62fa66288203ed
PostUrl: website "/e/extend/WordPaster/upload.php",
//为图片地址增加域名:http://www.ncmem.com/doc/view.aspx?id=704cd302ebd346b486adf39cf4553936
ImageUrl: "",
//设置文件字段名称:http://www.ncmem.com/doc/view.aspx?id=c3ad06c2ae31454cb418ceb2b8da7c45
FileFieldName: "file",
//提取图片地址:http://www.ncmem.com/doc/view.aspx?id=07e3f323d22d4571ad213441ab8530d1
ImageMatch: '',
ui:{render:"wdpst"}
});//加载控件
<?=$ziduan?>=UE.getEditor('<?=$ziduan?>',{
serverUrl: "<?=$public_r['newsurl']?>e/extend/ueditor/php/controller.php",//自己的请求接口
toolbars:Default,//工具栏配置文件,具体参考ueditor.toolbarconfig.js文件中说明
pageBreakTag:'',//帝国分页标签
initialFrameWidth:'100%',//编辑器宽
initialFrameHeight:300//编辑器高
//等等其它配置自行添加,参考UE默认配置文件复制修改即可
});
//自定义请求参数
<?=$ziduan?>.ready(function(){
<?=$ziduan?>.execCommand('serverparam',{
'filepass':'<?=$filepass?>',//修改时候是信息ID
'classid' :'<?=$classid?>',
'qiantai':<?=$qiantai?>
});
});
</script>
<table width="100%"border="0"cellpadding="3"cellspacing="1"bgcolor="#DBEAF5">
<tr height="25">
<td bgcolor="#FFFFFF"> <input name="dokey"type="checkbox"value="1"<?=$r[dokey]==1?' checked':''?>>
关键字替换 <input name="copyimg" type="checkbox" id="copyimg" value="1">
远程保存图片(
<input name="mark"type="checkbox"id="mark"value="1">
<a href="SetEnews.php"target="_blank">加水印</a>)
<input name="copyFLASH"type="checkbox"id="copyflash"value="1">
远程保存FLASH(地址前缀:
<input name="qz_url"type="text"id="qz_url"size="">
)</td>
</tr>
<tr height="25">
<td bgcolor="#FFFFFF"><input name="repimgnexturl"type="checkbox"id="repimgnexturl"value="1"> 图片链接转为下一页 <input name="autopage" type="checkbox" id="autopage" value="1">自动分页
,每
<input name="autosize"type="text"id="autosize"value="5000"size="5">
个字节为一页 取第
<input name="getfirsttitlepic"type="text"id="getfirsttitlepic"value=""size="1">
张上传图为标题图片(
<input name="getfirsttitlespic"type="checkbox"id="getfirsttitlespic"value="1">
缩略图: 宽
<input name="getfirsttitlespicw"type="text"id="getfirsttitlespicw"size="3"value="<?=$public_r[spicwidth]?>">
*高
<input name="getfirsttitlespich"type="text"id="getfirsttitlespich"size="3"value="<?=$public_r[spicheight]?>">
)</td>
</tr>
</table>
4.填写授权码
在本地(localhost)中使用时不需要配置授权码。
在线上环境,正式环境(非localhost,非127.0.0.1)中使用时需要配置授权码。
整合后的效果
图片保存的路径