当前位置:网站首页>Phpcms upgrade editor method -- simple and effective

Phpcms upgrade editor method -- simple and effective

2022-06-24 15:11:00 Champion Baoda

1、 First go to the official website to download the latest version http://ckeditor.com/download;

2、 Download the compressed package, decompress it, and put it into /statics/js In the folder ;

3、 open phpcms\libs\classes\attachment.class.php, modify :

	/**
	 * ck The editor returns 
	 * @param $fn 
	 * @param $fileurl  route 
	 * @param $message  display information 
	 */
	
	function mkhtml($fn,$fileurl,$message) {
		//$str='<script type="text/javascript">window.parent.CKEDITOR.tools.callFunction('.$fn.', \''.$fileurl.'\', \''.$message.'\');</script>';
		$arr=array('fileName'=>'image.png','uploaded'=>1,'url'=>$fileurl);
		//exit($str);
		exit(json_encode($arr));

Just make it exactly the same .

Get it done .

原网站

版权声明
本文为[Champion Baoda]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/05/20210521184407172a.html