I recently made a website for the first time. When I was working on the background, I wanted to use a text editor. I read several common editors on the Internet.
Http://www.cnblogs.com/conquer/archive/2008/05/05/1183386.html
At the same time, I also collected data online. I checked the FCKeditor by the way. The following describes the procedure
First download a FCKeditor from the Internet. Its official website is www.fckeditor.net. You can download the latest FCKeditor from its official website. The download page is http://www.fckeditor.net/download. The latest version is FCKeditor 2.6.3. Be sure to download another item. Find FCKeditor. Net and download the latest control.
In this case, you have two packages: fckeditor_2.6b.zipand fckeditor_net.zip.
1,Decompress fckeditor_2.6b.zip and copy the decompressed fckeditor folder to our website. Note that it is best to place fckeditor in the root directory of the website.
2,Solution
Compressed fckeditor_net.zip. You will see a file named FredCK. FCKeditorV2.dll (may vary slightly due to different versions ). Now
Add and reference it to our website. In Solution Explorer, right-click the project name and select Add reference. In the displayed dialog box, select Browse
Tag and find the dll file, and click OK. You will find that the website has a directory named bin, where FredCK. FCKeditorV2.dll is located.
3,Open the toolbox, right-click the Add tab, name it webeditor, and click OK. On this tab, right-click and select an item. In the displayed dialog box, browse and find the dll file, and click OK. Then you can see that the webeditor tab has a control named fckeditor.
4,Using this control is simple. Just like using other. net controls, you can drag it to the page.
The Code on the page is as follows:
<Div>
<% -- FckEditor text editor -- %>
<FCKeditorV2: FCKeditor ID = "cFckeditor" runat = "server" Height = "300px" Width = "600px" BasePath = "~ /FckEditor/"/>
</Div>
Note that you need to configure several parameters. BasePath as the reference address, which varies with the location of the fckeditor folder. In addition, there are many parameters, such as setting the default language, uploading the image path, and whether full screen display is supported... waiting. I will not list them here.
5,If you want to configure parameters such as BashPath every time, you can add the configuration information to the config file. The Code is as follows:
<Deleetask>
<Add key = "FCKeditor: BasePath" value = "~ /FckEditor/"/>
</AppSettings>
6,There are also 1.1 precautions. Sometimes you need to use fCkeditorAdd ValidateRequest = "false" to the top page element of the page ". In this way, "Request. Form values that are potentially dangerous are not detected ." .
7,Use fckeditor. value to obtain the value in the fckeditor editor. The source code of html is obtained.
8,. Configure fckeditor
Find fckeditor \ editor \ filemanager \ connectors \ aspx and change return false in the CheckAuthentication () function to return true.
Find fckeditor \ fckconfig. js
Convert var _ FileBrowserLanguage = 'php'; // asp | aspx | cfm | lasso | perl | PHP | py
Var _ QuickUploadLanguage = 'php'; // asp | aspx | cfm | lasso | perl | PHP | py
Change
Var _ FileBrowserLanguage = 'aspx '; // asp | aspx | cfm | lasso | perl | php | py
Var _ QuickUploadLanguage = 'aspx '; // asp | aspx | cfm | lasso | perl | php | py
5. Path of the configuration file
Open VS, "website", "asp.net configuration" in the menu bar, click "application settings", "create application settings", and fill in FCKeditor: BasePath in the name column, enter ~ In the value options ~ /Fckeditor/(note: this is the path of the fckeditoR folder relative to the dll in the bin folder. If it is entered incorrectly, the file cannot be found .) Save.
Add "name" FCKeditor: UserFilesPath, value ~ /Files/(this is also relative to the dll path), files is used to store uploaded Files. Create a files folder on your website, and create an image folder.
In addition, you can change the appropriate skin according to your page requirements. FCLeditor has three default skins: default, office2003, and silver.
You can select one based on your needs. Next let's talk about how to change
Edit fckconfig. js in the fck directory
Find this line
FCKConfig. SkinPath = FCKConfig. BasePath +
Modifiable
FCKConfig. SkinPath = FCKConfig. BasePath + 'Skins/silver /';
FCKConfig. SkinPath = FCKConfig. BasePath + 'Skins/office2003 /';