(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | It is so easy to use FCKeditor in your Java/JSP web pages. Just download the JSP Integration Pack for using FCKeditor inside a java server page without the complexity of using a Java scriptlets or the JavaScript API. | + | <div align="center"><font color="red" size="+1">This page is obsolete and applies to FCKeditor.Java 2.3 only. Visit [http://java.fckeditor.net/ this website] for the new documentation.</font></div> |
+ | It is so easy to use FCKeditor in your Java/JSP web pages. Just download the JSP Integration Pack for using FCKeditor inside a java server page without the complexity of using a Java scriptlets or the JavaScript API. | ||
− | == | + | == Configuring your site<br> == |
− | === Step 1 === | + | === Step 1 === |
− | First step you should take in order to integrate FCKeditor with you page is downloading the latest version of the JSP Integration Pack from from our download site.You can find the latest version of the package under this address: | + | First step you should take in order to integrate FCKeditor with you page is downloading the latest version of the JSP Integration Pack from from our download site.You can find the latest version of the package under this address: |
− | http://www.fckeditor.net/download | + | http://www.fckeditor.net/download |
− | '''Note''': The main code is not included in this package, just the JSP Integration Pack. You still need the FCKeditor scripts to be able to run it, so you should download it as well | + | '''Note''': The main code is not included in this package, just the JSP Integration Pack. You still need the FCKeditor scripts to be able to run it, so you should download it as well |
− | === Step 2 === | + | === Step 2 === |
− | * Unpack the Java Integration Library in a directory named "fckeditor". | + | *Unpack the Java Integration Library in a directory named "fckeditor". |
− | * Unzip the content of the FCKeditor release of your choice inside the "fckeditor\web" folder. | + | *Unzip the content of the FCKeditor release of your choice inside the "fckeditor\web" folder. |
− | == | + | == Integration == |
− | + | === Step 1 === | |
− | + | Create in tomcat (or any servlet container) a new context named "FCKeditor" that points to the previously created "fckeditor\web" folder. | |
− | * Point your browser to http://domainName.ext/FCKeditor/_samples/index.jsp for the list of the samples. | + | === Sample code === |
+ | <pre><%@ page language="java" import="com.fredck.FCKeditor.*" %> | ||
+ | <html> | ||
+ | <head> | ||
+ | <title>FCKeditor - JSP Sample</title> | ||
+ | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
+ | <script type="text/javascript"> | ||
+ | function FCKeditor_OnComplete( editorInstance ) | ||
+ | { | ||
+ | window.status = editorInstance.Description ; | ||
+ | } | ||
+ | </script> | ||
+ | </head> | ||
+ | <body> | ||
+ | <form action="sampleposteddata.jsp" method="get" target="_blank"> | ||
+ | |||
+ | <% | ||
+ | FCKeditor oFCKeditor ; | ||
+ | oFCKeditor = new FCKeditor( request, "EditorDefault" ) ; | ||
+ | oFCKeditor.setBasePath( "/fckeditor/" ) ; | ||
+ | oFCKeditor.setValue( "This is some <strong>sample text</strong>. You are using <a href=\"http://www.fredck.com/fckeditor/\">FCKeditor</a>." ); | ||
+ | out.println( oFCKeditor.create() ) ; | ||
+ | %> | ||
+ | |||
+ | <input type="submit" value="Submit"> | ||
+ | </form> | ||
+ | </body> | ||
+ | </html> | ||
+ | </pre> | ||
+ | == Additional information == | ||
+ | |||
+ | *Point your browser to http://domainName.ext/FCKeditor/_samples/index.jsp for the list of the samples. |
Latest revision as of 01:25, 6 July 2008
It is so easy to use FCKeditor in your Java/JSP web pages. Just download the JSP Integration Pack for using FCKeditor inside a java server page without the complexity of using a Java scriptlets or the JavaScript API.
Contents
Configuring your site
Step 1
First step you should take in order to integrate FCKeditor with you page is downloading the latest version of the JSP Integration Pack from from our download site.You can find the latest version of the package under this address:
http://www.fckeditor.net/download
Note: The main code is not included in this package, just the JSP Integration Pack. You still need the FCKeditor scripts to be able to run it, so you should download it as well
Step 2
- Unpack the Java Integration Library in a directory named "fckeditor".
- Unzip the content of the FCKeditor release of your choice inside the "fckeditor\web" folder.
Integration
Step 1
Create in tomcat (or any servlet container) a new context named "FCKeditor" that points to the previously created "fckeditor\web" folder.
Sample code
<%@ page language="java" import="com.fredck.FCKeditor.*" %> <html> <head> <title>FCKeditor - JSP Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { window.status = editorInstance.Description ; } </script> </head> <body> <form action="sampleposteddata.jsp" method="get" target="_blank"> <% FCKeditor oFCKeditor ; oFCKeditor = new FCKeditor( request, "EditorDefault" ) ; oFCKeditor.setBasePath( "/fckeditor/" ) ; oFCKeditor.setValue( "This is some <strong>sample text</strong>. You are using <a href=\"http://www.fredck.com/fckeditor/\">FCKeditor</a>." ); out.println( oFCKeditor.create() ) ; %> <input type="submit" value="Submit"> </form> </body> </html>
Additional information
- Point your browser to http://domainName.ext/FCKeditor/_samples/index.jsp for the list of the samples.