asp.net FCKeditor 2.6.3 Configuration Instructions _ Web Editor

Source: Internet
Author: User
Tags auth
It does not need to install any form of client, compatible with the vast majority of mainstream browsers, support ASP.net, ASP, ColdFusion, PHP, Java, Active-foxpro, Lasso, Perl, Ython and other programming environments.

Official website http://www.fckeditor.net/

Official documents http://wiki.fckeditor.net/

Download Address http://www.fckeditor.net/download/default.html
FCKeditor Installation and Configuration
Download the Fckeditor2.63.zip and fckeditor.net2.63 version of the 2 Zip packages
(a) fckeditor_2.6.3 are resource files such as HTML files, JavaScript files, and pictures
(b) Fckeditor.net_2.6.3.zip is a asp.net control DLL file
Add a reference to FCKeditor in the ASP.net project
1. Select Add Reference on project (add Reference ... ), locate the Browse tab, and then locate the FredCK.FCKeditorV2.dll you unzipped, and confirm it.
2. To facilitate RAD development, you can add the FCKeditor control to the VS Toolbox (Toolbox), expand the Common Label Group (general) for the Toolbox, and right-click the component (Choose Items ...). ), find the browse button directly on the dialog box, locate the FredCK.FCKeditorV2.dll, and then confirm it.
3. Configure Web.config, add at <appSettings> node as follows:

Copy Code code as follows:

<appSettings>
<add key= "Fckeditor:basepath" value= "~/web/fckeditor/"/>
<add key= "Fckeditor:userfilespath" value= "~/web/upload/"/>
</appSettings>

FCKeditor configuration:
Go to the FCKeditor folder and edit the Fckconfig.js file
1, modify:
Copy Code code as follows:

var _filebrowserlanguage = ' php '; ASP | aspx | CFM | Lasso | Perl | php | Py
var _quickuploadlanguage = ' php '; ASP | aspx | CFM | Lasso | Php

For:
Copy Code code as follows:

var _filebrowserlanguage = ' aspx '; ASP | aspx | CFM | Lasso | Perl | php | Py
var _quickuploadlanguage = ' aspx '; ASP | aspx | CFM | Lasso | Php

2. Configure language
Modify:
fckconfig.defaultlanguage = ' en ';
To
Fckconfig.defaultlanguage = ' ZH-CN ';
3, the disposition skin, has the default, the office2003, the silver style and so on, may use the acquiescence.
Fckconfig.skinpath = Fckconfig.basepath + ' skins/default/';
4. You can use the TAB key in the Editor field. (1 for Yes, 0 for No)
fckconfig.tabspaces = 0; Changed to Fckconfig.tabspaces = 1;
5, plus a few commonly used fonts:
Fckconfig.fontnames = ' song body; bold; official script; italics _gb2312; Arial; Comic Sans MS; Courier New; Tahoma; Times New Roman; Verdana ';
6, the editor domain default display font is 12PX, want to modify the style sheet can be modified to meet the requirements, open/editor/css/fck_editorarea.css, modify font-size properties can
7. About Security
If your editor is not certified in front of the desk, recommend using basic toolbar
fckconfig.toolbarsets["Basic"] = [
[' Bold ', ' Italic ', '-', ' orderedlist ', ' unorderedlist ', '-', ' Link ', ' Unlink ', ' Image ', '-', ' about ']
] ;
8, in the Upload File window Click Browse Server, may appear the server didn ' t send back a proper XML ... Error prompts, because FCKeditor requires different types of files to be uploaded to different directories, including directories such as File,image,falsh,media, you can first set up to try.
Security Configuration for Fckeditor.net 2.6
File upload, has always been easy to exploit the attack channel, hehe, so here to focus on mentioning:
Open Editor/filemanager/connectors/aspx/config.ascx
Copy Code code as follows:

private bool Checkauthentication ()
{
To prevent any user from opening an upload page or browsing a server file
It is recommended that you integrate this with your background admin permissions and return True if you do not need to validate
//------------------------------------------------
1. Suppose you use the session to store the user's login authentication information, assuming the session key is Auth
You need to return
Return (session["auth"]!= null && session["auth"] = = "Validation value");
2. If you use form validation method, you can verify
return Page.User.Identity.IsAuthenticated;
Warning:do not simply return "true". By doing so, your are allowing
"Anyone" to upload and list the files in your server. You must implement
Some kind of 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 in your system.
return true;
}

I have a description of the above part in the Chinese and used

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.