CKEditor uploading images-configuring Ckfinder
In the development of Web site, if there is a similar news to publish the picture and text mix requirements, CKEditor is a good choice, as follows:
Http://ckeditor.com/download
Its predecessor is FCKeditor, with its update, the function of uploading pictures is separated out, now if you need to implement upload images, or write their own code, there is a way to use Ckfinder, as follows:
Http://ckfinder.com/download
Here's a detailed description of how to configure when using them.
CKEditor i downloaded the 3.6.4,ckfinder download is 2.3 for ASP, first unzip all the files, and then put the CKEditor and Ckfinder folder in the Site directory, You can delete the _samples, _source folder under the CKEditor and Ckfinder folders, add CKFinder.dll to the bin/folder of the site, and then add the JS reference to the head of the Site page, depending on the path you have placed, as follows:
<script src= ". /editor/ckeditor/ckeditor.js "type=" Text/javascript "></script><script src=". /editor/ckfinder/ckfinder.js "type=" Text/javascript "></script>
Add a textarea to the page with the following code:
<textareaname= "Individual"ID= "Individual"runat= "Server"></textarea><Scripttype= "Text/javascript">Ckeditor.replace ('individual');</Script>
Next open the CKEditor folder under the Config.js file, in ckeditor.editorconfig = function (config) {}, add the following code to the method:
Config.filebrowserimagebrowseurl = '. /editor/ckfinder/ckfinder.html? Type=images '; config.filebrowserflashbrowseurl = '. /editor/ckfinder/ckfinder.html? Type=flash '; config.filebrowseruploadurl = '. /editor/ckfinder/core/connector/aspx/connector.aspx?command=quickupload&type=files '; Config.filebrowserimageuploadurl = '. /editor/ckfinder/core/connector/aspx/connector.aspx?command=quickupload&type=images '; Config.filebrowserflashuploadurl = '. /editor/ckfinder/core/connector/aspx/connector.aspx?command=quickupload&type=flash '; Config.filebrowserwindowwidth = ' + '; The size setting of the Browse Server pop-up box Config.filebrowserwindowheight = ' 500 ';
The above path also needs to be based on your own settings.
Then open the Ckfinder folder under the Config.ascx file, in order to all people can see the server upload folder inside the file, the function public override bool Checkauthentication return value to True, In fact, according to the security needs of their own website to change the code, this is just for simple implementation, the code is as follows:
Public override bool Checkauthentication () {//Warning:do not simply return "true". By doing so, you are allowing //"Anyone" to upload and lists the files in your server. You must implement //some kind of the session validation here. Even something very simple as ... // //return (session["isauthorized"]! = NULL && (BOOL) session["isauthorized"] = = true); // //... where session["isauthorized"] is set to "true" as soon as the //user logs on your system. return true; }
CKEditor uploading images-configuring Ckfinder (from www.sysoft.cc www.sysoft.net.cn)