It can be combined with different programming languages such as PHP, JavaScript, ASP, ASP. NET, ColdFusion, Java, and ABAP. "FCK" in the "FCKeditor" name is the abbreviation of the author's name Frederico Caldeira Knabben.
Download the FCKeditor Control from the official website.Http://www.fckeditor.netYou can download some content in the notebook.
1. Open the compressed package fckeditor_2.6.3.zip, copy the fckeditor folder to the WEB-INF, which can be directly used later.
2. There are two ways to use FCKeditor on the page.
Method 1: JavaScript
(1)for direct use, see method1.html
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN">
<Html>
<Head>
<Script type = "text/javascript" src = "fckeditor/fckeditor. js"> </script>
</Head>
<Body>
Method 1: Implement editor import through JavaScript <br>
<Script type = "text/javascript">
Var oFCKeditor = new FCKeditor ('fckeditor1 ');
OFCKeditor. BasePath = "fckeditor /";
// OFCKeditor. BasePath = "/FCKEditTest/fckeditor /";
OFCKeditor. Width = "50% ";
OFCKeditor. Height = "400 ";
OFCKeditor. Value = "initial value ";
// OFCKeditor. ToolbarSet = "Basic ";
// The default value is default.
OFCKeditor. ToolbarSet = "Default ";
OFCKeditor. Create ();
</Script>
<Hr>
</Body>
</Html>(2)through textarea, see method2.html
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN">
<Html>
<Head>
<Script type = "text/javascript" src = "fckeditor/fckeditor. js"> </script>
<Script type = "text/javascript">
Window. onload = function (){
Var oFCKeditor = new FCKeditor ('mytextarea ');
OFCKeditor. BasePath = "fckeditor/"; // pay attention to the relative path
// OFCKeditor. BasePath = "/FCKEditTest/fckeditor /";
OFCKeditor. ReplaceTextarea ();
}
</Script>
</Head>
<Body>
Method 2: Implement editor import through Textarea <br>
<Textarea rows = "4" cols = "60" name = "MyTextarea"> this is a value </textarea>
</Body>
</Html>
Method 2: Use FCKeditor on tags
Before using tags, you need to build an environment. Copy the slf4j-simple-1.5.2.jar in idea to the lib directory and build the environment.
After the construction, you can use it on the JSP page. See method_jsp.jsp.
<% @ Page language = "java" import = "java. util. *" pageEncoding = "UTF-8" %>
<% @ Taglib uri = "http://java.fckeditor.net" prefix = "FCK" %>
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN">
<Html>
<Head>
<Title> method_jsp.jsp </title>
</Head>
<Body>
In earlier versions, the Value attribute of fckeditor must be specified and the Value cannot be blank.
The version 2.6.3 has been resolved.
<FCK: editor instanceName = "myEditor" basePath = "/fckeditor"> </FCK: editor>
</Body>
</Html>