[Editor] fck network editor configuration

Source: Internet
Author: User

I. Integration Method
1. Add the FCKeditor folder to the program

2. Add the Files folder in the program and set the write permission (Folder properties -- Security -- set the access user permission to full control) (it is recommended to add the folder to the same level directory)

3. Right-click the Assembly and choose browse> select DLL file.

4. Right-click the control added in the toolbox and choose tools> browse> select DLL file.

5. modify web. config -- Add the following Settings section

The website Program Folder ZK contains: fck Program folder (FCKeditor) and the folder (uploadimage) and
Upload the page folder (sys). To express the directory hierarchy, I use a set to represent the file directory:
ZK {FCKeditor and uploadimage and SYS {uploadpic. aspx }},,
As follows:
+ ZK (website directory)
---- FCKeditor (fck Program Folder)
---- Uploadimage (the folder of the uploaded image)
--- + Sys (folder for uploading image pages)
---- Uploadpic. aspx (the upload image page is placed with the fck text editor Control)
(1) situation:
The configuration in Web. config is as follows:
<Add key = "FCKeditor: basepath" value = "~ /FCKeditor/"/>
<Add key = "FCKeditor: userfilespath" value = "/ZK/contentfck"/> ---- >>> in three cases, the settings are different.

Note:
Basepath is the path where FCKeditor is located. FCKeditor can be written directly in the website directory. If your website has more layers, you can adjust it.
Userfilespath is the directory of all uploaded files. Why do we need to set it to/files instead ~ /Files, because FCKeditor uses this value to return the relative path of the uploaded file to the client. Otherwise, the customer will retrieve the machine directory of the customer rather than the HTTP directory.

Ii. Configure FCKeditor
According to the default configuration of FCKeditor, you can complete some common HTML visual editing tasks. However, further configuration is required in actual applications. The FCKeditor Control has few configurable attributes and can only act on one single instance after configuration. In fact, you need to configure the common configuration file/fckconfig in the FCKeditor file group. JS and ASP.. Net private file upload management code file/Editor/filemanager/connectors/aspx/config. configure ascx.

1. Configure the control language
FCKeditor automatically detects the language encoding used by the browser. The default language is English. Modify the configuration line "fckconfig. defaultlanguage = 'en';" to 'zh-cn'. use Chinese as the default language.

2. Configure the Control Application Technology
FCKeditor is used for PHP by default. Modify the configuration line "VaR _ filebrowserlanguage = 'php';" and "VaR _ quickuploadlanguage = 'php';" to 'ASP', using ASP. NET technology.

3. Configure the tab key
The default Tab key is unavailable in FCKeditor. You can modify the configuration line "fckconfig. tabspaces = 0;" to 1, and enable the tab key.

4. Customize the FCKeditor Toolbar
Fckconfig provides two toolbar configurations. In the configuration line "fckconfig. toolbarsets [" default "] = [...];", the configuration of all available buttons is defined (as the default configuration of the toolbar ). In the configuration line "fckconfig. toolbarsets [" Basic "] = [...];", the toolbar configuration of a simplified button is defined. In actual use, there are too many configuration buttons by default, and there are too few simplified configuration buttons. Therefore, you need to customize the toolbar.
Configuration value [...] in the format of [[V, V2 ,.., VN], '/', [...],...] (VN indicates the name of the button to be displayed, '/' indicates the next row of the subsequent button group. If you do not need a button for the entire group, delete the group (in the form of [,...]). If you only do not need a button in the group, delete the button.

5. Customize available text Fonts
FCKeditor is made by foreigners. The default font is also a Spanish font. Modify the configuration line "fckconfig. fontnames = '...';" and add the names of Chinese characters to be used, such as, and _ gb2312.
By default, fckconfig uses the HTML font keyword to indicate the optional font size, which leads to inconsistent display effects in different browsers. Therefore, we recommend that you modify the configuration line "fckconfig. fontsizes = '...';" to remove the font keyword value and add the pixel value or pound value. (Of course, if the global style sheet is defined on the webpage, you do not need to modify this setting, but you should teach the end user how to set the font to achieve the best display effect .)

6. Enable File Upload
FCKeditor provides powerful and easy-to-use File Upload functions, but the file upload function is not available in the default configuration, which is based on security considerations. However, I think that access security control should be implemented by programs rather than controls.
In the config. ascx file, modify the value of checkauthentication () to true. If you want to upload a file with multiple extensions, set the value of forcesingleextension in setconfig () to false. FCKeditor can upload files, images, Flash files, and multimedia files by default () modify allowedtypes to increase or decrease the allowed types (this type can be defined in typeconfig ["typename"]. For example, in the allowedextensions attribute, you can customize the file extension allowed by this type, customize the file extension that is not allowed in deniedextensions ).
In the fckconfig. js file, modify the configuration line "fckconfig. linkbrowserurl = fckconfig. basepath + 'filemanager/Browser/default/browser.html? Connector = '+ encodeuricomponent (fckconfig. basepath + 'filemanager/connectors/' + _ filebrowserlanguage + '/connector.' + _ filebrowserextension
); "Is fckconfig. linkbrowserurl = fckconfig. basepath + 'filemanager/Browser/default/browser.html? Type = file & connector = '+ encodeuricomponent (fckconfig. basepath + 'filemanager/ORS ors/'+ _ filebrowserlanguage +'/connector. '+ _ filebrowserextension); "; modify the configuration line" fckconfig. linkuploadurl
= Fckconfig. basepath + 'filemanager/connectors/'+ _ quickuploadlanguage +'/upload. '+ _ quickuploadextension; "is" fckconfig. linkuploadurl = fckconfig. basepath + 'filemanager/connectors/'+ _ quickuploadlanguage +'/upload. '+ _ quickuploadextension + '? Type = FILE'
;". (In this configuration file, it seems that type = file is used as the default parameter, but if this parameter is not added, an error will occur .)

7. Other configurations
For the configuration attributes in these two configuration files, you can easily know the meaning of the two configuration files from the name, which can be basically customized. Note that the format of the attribute value must be correct.

3. Set the FCKeditor file to ASP. NET.
The FCKeditor file group contains files for various application technologies supported by the FCKeditor. Therefore, many files are not required for ASP. NET applications.

In the root directory, only the folder editor is retained. The files fckconfig. JS, FCKeditor. JS, fckpackager. XML, fckstyles. XML, and fcktemplates. XML are retained.
Only the folder aspx is retained under the subdirectory Editor, filemanager, and connectors.

 

Bytes --------------------------------------------------------------------------------------------------------------------
Image path E:/LW/FCKeditor/Editor/filemanager/connectors/aspx/LW/files/Image

FCKeditor online editor, insert image, prompt information, cannot be written in Chinese
Article category: Java programming
Description of FCKeditor File Upload prompt
In FCKeditor, although the client language can be automatically monitored, a small amount of information is still unavailable. For example, when an image or flash is uploaded, the prompt information in the dialog box Indicating upload success or upload failure is in English. You only need to find the corresponding prompt text and change it to Chinese.
The following uses the prompts when uploading images in Chinese as an example:
Use DW or ue to open the fck_image.js file in FCKeditor/Editor/dialog/fck_image. First, find row 438,
Replace the original "your file has been successfully uploaded" with "the file has been uploaded successfully !", Likewise,
In row 3, replace "a file with the same name is already available. the uploaded file has been renamed to" with "the file with the same name already exists. The uploaded file is automatically named :",
Row 3: "the file type is incorrect !" Replace "invalid file type ",
Row 3: "You may not have sufficient permissions to upload files. Check the server settings ." Replace "security error. You probably don't have enough permissions to upload. Please check your server .",
Row 3: "'file Upload Failed! Error Code: "replace" error on File Upload. error number :",
Line 3: replace "select file to upload" with "Please select a file to upload ".
In this way, the Chinese version is completed, and the Chinese version of the flash upload interface is the same.

After the above method is modified, the Chinese prompt will be garbled because the encoding format of the fck_image.js file is gb18080 by default. You need to change the encoding of the fck_image.js file to UTF-8.

When you delete an uploaded image, the following information is displayed:
FCKeditor/Editor/dialog/fck_image/fck_image_preview.html

Find

Lorem
Ipsum dolor sit Amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam.
Maecenas metus. vivamus diam Purus, cursus A, commodo non, facilisis Vitae, nulla.
Aenean dictum lacinia tortor. nunc iaculis, nibh non iaculis aliquam, orci Felis
Euismod neque, sed ornare massa mauris sed Velit. Nulla presponmi et risus. fusce
Mi Pede, Tempor ID, cursus AC, ullamcorper NEC, enim. Sed tortor. curabitur molestie.
DUIs Velit augue, condimentum at, ultrices A, luctus ut, orci. donec pellentesque
Egestas Eros. Integer cursus, augue in cursus faucibus, Eros Pede Bibendum SEM,
In Tempus Tellus Justo Quis ligula. etiam eget tortor. vestibulum rutrum, est UT
Placerat elementum, lectus nisl aliquam Velit, Tempor aliquam Eros nunc nonummy
Metus. In Eros metus, gravida A, gravida SED, lobortis ID, turpis. ut ultrices,
Ipsum at venenatis Fringilla, SEM nulla lacinia Tellus, eget aliquet turpis mauris
Non enim. Nam turpis. suspendisse lacinia. curabitur AC tortor ut ipsum egestas
Elementum. nunc imperdiet gravida mauris.

Just remove it.

Tieguanyin-factory direct sales

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.