Ckeditor and ckfinder 配置实现截图上传图片到远程服务器

本文介绍了如何配置Ckeditor和Ckfinder以实现在编辑器中上传并粘贴截图到远程服务器。首先从CKEditor官网下载所需文件,然后创建一个项目文件夹并进行文件组织。在config.js中配置编辑器的语言和皮肤。在页面上加载编辑器,并通过提交内容到upload.php处理上传。服务器端的uploadimg.php负责接收并保存图片。当上传成功后,通过jump.php返回URL。完成配置后,可以在本地项目文件夹pasteDemo中实现截图上传功能。
摘要由CSDN通过智能技术生成

Ckeditorand ckfinder 配置实现上传图片到远程服务器

1.      从ck官网下载两个文件。


(文件夹解压后不必要的文件可以删除,samples、help 等以及skin皮肤文件夹下不要的皮肤也可以删掉,还有lang语言包下面除了zh-cn和en外其他也可以删掉,有你也看不懂)

2.      创建一个文件夹(比如:pasteDemo),将ckeditor和ckfinder放入其中。

3.      ckeditor/config.js用于配置ckeditor,比如config.language = ‘zh-cn’; config.skin= 'v2';

分别是配置语言和皮肤。

4.      在页面中加载ckeditor编辑器。见pasteDemo.php (已实现直接截图,粘贴至编辑器,谷歌浏览器支持,火狐已自带此功能)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title></title>

<link rel="stylesheet" href="css/std.css" type="text/css">

<script type="text/javascript" src="ckfinder/ckfinder.js"></script>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"  >
<form name=postcontent method="POST" action="upload.php">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td class="bigred" align="center" background="images/bgloveyou2.gif" height="10"></td>
      </tr>
      <tr>
        <td class="bigred" bgcolor="f7f7f7" align="center">内容</td>
      </tr>
      <tr> 
        <td align="center"
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值