Asp.net Text Editor (FCKeditor)

Source: Internet
Author: User

FCKeditor Introduction

FCKeditor is a powerful text editor that supports WYSIWYG and provides users with online document editing services like Microsoft office software. It is compatible with most mainstream browsers and supports programming environments such as ASP. NET, ASP, ColdFusion, PHP, Java, active-FoxPro, lasso, Perl, and ython.

Official WebsiteHttp://www.fckeditor.net/

Official documentationHttp://wiki.fckeditor.net/

Http://www.fckeditor.net/download/default.html

In fact, the configuration process of FCKeditor in different versions is similar. Here we will introduce the latest 2.63 as an example.


FCKeditor installation and configuration

ToHttp://www.fckeditor.netDownload two zip packages for fckeditor2.63.zip and FCKeditor. net2.63

(A) fckeditor_2.6.3 is its latest Javascript file and image;

(B) fckeditor.net_2.6.3.zip is an ASP. NET control DLL file.

Decompress a to obtain the core file of FCKeditor and copy it to the root directory of the WEB Project (we recommend that you store it as needed ). Decompress B and get. net-supported source code. Enter. The FCKeditor dll exists in the release under the Bin (the debug folder is also available here. We recommend that you use release). We need to add a reference to it in the project.

1. Right-click the project browser and choose add reference ...), Find the Browse tab, locate the extracted fredck. fckeditorv2.dll, and click OK. In this case, a bin folder is added to the fckpro project directory, which contains the fredck. fckeditorv2.dll file.

2. to facilitate rad development, we also add the FCKeditor Control to the toolbox of Vs, expand the common label Group of the Toolbox (general), right-click the component (choose items ...), Find the Browse button in the dialog box, locate fredck. fckeditorv2.dll, and then confirm.

3. Configure webconfig and add it to the <etettings> node, as shown below:

< Appsettings >
< Add  Key = "FCKeditor: basepath"  Value = "/Web/FCKeditor /" />
< Add  Key = "FCKeditor: userfilespath"  Value = "/Web/upload /"   />
</ Appsettings >

Description: "/web/" is the project name.

Basepath: FCKeditor is the directory of the entire FCKeditor folder.

Userfilespath: the path for storing uploaded files and images.

After completing the configuration, we can use the FCKeditor Control. To better debug this tool to meet our actual needs, we must modify its attribute settings.

FCKeditor detailed settings

Go to the FCKeditor folder and edit the fckconfig file. In fact, the list is clear, the compilation is more standardized, there are some notes, but as long as you understand English, you can understand it, the operation is also very convenient. The following describes several common settings as a small example.

1. This step is required and the most important step.

Originally:

VaR _ filebrowserlanguage = 'php'; // ASP | aspx | CFM | lasso | Perl | PHP | py

VaR _ quickuploadlanguage = 'php'; // ASP | aspx | CFM | lasso | PHP

Changed:

VaR _ filebrowserlanguage = 'aspx '; // ASP | aspx | CFM | lasso | Perl | PHP | py

VaR _ quickuploadlanguage = 'aspx '; // ASP | aspx | CFM | lasso | PHP

2. Configure the Language Pack. English and Traditional Chinese are available. Here we use simplified Chinese.

Originally:

Fckconfig. defaultlanguage = 'en ';

Changed:

Fckconfig. defaultlanguage = 'zh-cn ';

3. Configure the skin. There are default, office2003, silver style, etc. here we can use the default.

Fckconfig. skinpath = fckconfig. basepath + 'Skins/default /';

4. You can use the tab key in the editor. (1 is yes, 0 is no)

Change fckconfig. tabspaces = 0; To fckconfig. tabspaces = 1;

5. add several common font methods, such:

Modify

Fckconfig. fontnames = 'arial; Comic Sans MS; Courier New; tahoma; Times New Roman; verdana ';

Changed:

Fckconfig. fontnames = '; _ gb2312; Arial; Comic Sans MS; Courier New; tahoma; Times New Roman; verdana'

6. The default font in the editor is 12px. You can modify the style sheet to meet the requirements. Open/Editor/CSS/fck_editorarea.css and modify the font-size attribute. Such as font-size: 14px;

7. Security.

If your editor is used on the front-end of the Website, you have to consider security. Do not use the default toolbar on the front-end, either customize the function or use the basic defined by the system, that is, the basic toolbar,

Fckconfig. toolbarsets ["Basic"] = [
['Bold ', 'italic', '-', 'orderedlist', 'unorderedlist', '-', 'link', 'unlink', 'image ', '-', 'about']
];

In fact, you can set these settings as needed. They are powerful enough to provide more options and certainly meet your needs.

Of course, you can also configure webconfig to ensure security. Next we will talk about it.

FCKeditor 2.6:

1. FCKeditor "this connector is disabled please check the" Editor/filemanager/connectors/aspx/config. aspx "error Solution

Open Editor/filemanager/connectors/aspx/config. ascx and modify the checkauthentication () method. True is returned.

Private   Bool  Checkauthentication ()
{
Return   True ;
}


2. in the Upload File window, click browse server, and the server didn't send back a proper XML will appear ..... error message: FCKeditor later versions require different types of files to be uploaded to different directories, including directories such as file, image, falsh, and media, which must be created first.


FCKeditor simplified

Go to the FCKeditor folder and delete all files and folders starting with "_". These are examples. Only the Editor folder, fckconfig, FCKeditor, and fckstyles are retained. XML, fcktemplates. XML is enough;

Go to the Editor folder and delete the "_ source" folder, which also contains the source file;

Go back to the upper-level directory and enter the filemanager folder. There are two folders: browser and upload. Go to Browser "default" connectors, and retain only the aspx folder, and delete the rest; The mcpuk directory can also be deleted; the same is true for upload, and only the aspx folder;

Return to the editor and enter the images folder. The smiley folder contains emoticon icons, including MSN and fun. If you want to use your own emoticon icons, you can delete them; if you want to use the emojis here, do not delete them;

Lang contains a Language Pack. If you only use simplified Chinese, you can only keep the fck1_agemanager and ZH-CN files. We recommend that you retain en (English) and ZH (Traditional Chinese) files) two files. fcklanguagemanager is the language configuration file, which can be paired with the settings in fckconfig. The corresponding language file must be retained!

Exit the Lang folder and enter the skins folder. If you want to use the default FCKeditor milk yellow, delete the other two folders except the default folder. If you want to use other folders, it depends on your preferences.

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.