Index: /CKEditor.Java/ckeditor-java/tags/3.5.3/pom.xml
===================================================================
--- /CKEditor.Java/ckeditor-java/tags/3.5.3/pom.xml (revision 6850)
+++ /CKEditor.Java/ckeditor-java/tags/3.5.3/pom.xml (revision 6850)
@@ -0,0 +1,113 @@
+
+ 4.0.0
+ com.ckeditor
+ ckeditor-java
+ CKEditor for Java
+ CKEditor Server Side Integration for Java with samples.
+ This Java library enables CKEditor to be used in a Servlet/J2EE
+ environment. It provides JSP tags for creating a CKEditor instance.
+ Samples and CKEditor (the editor) are included.
+ 3.5.3
+ http://ckeditor.com
+ 2003
+
+
+ GNU General Public License Version 2 or later (GPL)
+ http://www.gnu.org/licenses/gpl.html
+
+
+ GNU Lesser General Public License Version 2.1 (LGPL)
+ http://www.gnu.org/licenses/lgpl.html
+
+
+ Mozilla Public License Version 1.1 or later (MPL)
+ http://www.mozilla.org/MPL/MPL-1.1.html
+
+
+
+ CKSource - Frederico Knabben
+ http://cksource.com
+
+ war
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 2.3.2
+
+
+ 1.5
+ utf-8
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 2.2
+
+ UTF-8
+
+
+
+ org.apache.maven.plugins
+ maven-clean-plugin
+ 2.4.1
+
+
+
+ src/main/webapp
+
+ **/*.php
+ **/*.asp
+
+ false
+
+
+ src/main/webapp/ckeditor/_samples/asp
+ false
+
+
+ src/main/webapp/ckeditor/_samples/adobeair
+ false
+
+
+ src/main/webapp/ckeditor/_samples/php
+ false
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 2.1.1
+
+
+
+ ${project.organization.name}
+
+
+ true
+
+ false
+
+
+
+
+
+
+
+ com.ckeditor
+ ckeditor-java-core
+ ${project.version}
+
+
+ javax.servlet
+ servlet-api
+ 2.4
+ provided
+
+
+
Index: /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/java/com/ckeditor/SamplePostData.java
===================================================================
--- /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/java/com/ckeditor/SamplePostData.java (revision 6850)
+++ /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/java/com/ckeditor/SamplePostData.java (revision 6850)
@@ -0,0 +1,56 @@
+/*
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see http://ckeditor.com/license
+*/
+package com.ckeditor;
+
+import java.io.IOException;
+import java.util.Enumeration;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class SamplePostData {
+
+ private static final String[] CHARS_FROM = {"&", "\"", "<", ">"};
+ private static final String[] CHARS_TO = {"&", """, "<", ">"};
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8568318698824941902L;
+ private HttpServletRequest request;
+
+ public SamplePostData(HttpServletRequest request) {
+ this.request = request;
+ }
+
+ public String getAllFormFieldsAndValues() {
+ StringBuffer sb = new StringBuffer();
+
+ Enumeration e = request.getParameterNames();
+ while (e.hasMoreElements()) {
+ String field = (String) e.nextElement();
+ String fieldValue = request.getParameter(field);
+ sb.append("
");
+ sb.append("");
+ sb.append(parse(field));
+ sb.append(" | ");
+ sb.append("");
+ sb.append(parse(fieldValue));
+ sb.append(" | ");
+ sb.append("
");
+ }
+ return sb.toString();
+ }
+
+ private Object parse(String fieldValue) {
+ String fv = fieldValue;
+ for (int i = 0; i < CHARS_FROM.length; i++) {
+ fv = fv.replaceAll(CHARS_FROM[i], CHARS_TO[i]);
+ }
+ return fv;
+ }
+
+}
Index: /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/WEB-INF/web.xml
===================================================================
--- /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/WEB-INF/web.xml (revision 6850)
+++ /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/WEB-INF/web.xml (revision 6850)
@@ -0,0 +1,10 @@
+
+
+
+
+ 10
+
+
+
Index: /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/advanced.jsp
===================================================================
--- /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/advanced.jsp (revision 6850)
+++ /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/advanced.jsp (revision 6850)
@@ -0,0 +1,104 @@
+
+
+<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>
+<%@page import="com.ckeditor.CKEditorConfig"%>
+<%@page import="com.ckeditor.EventHandler"%>
+<%@page import="java.util.ArrayList"%>
+<%@page import="java.util.List"%>
+<%@page import="java.util.HashMap"%>
+<%@page import="java.util.Map"%>
+<%@page language="Java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+
+
+ Creating CKEditor Instances — CKEditor Sample
+
+
+
+
+
+ CKEditor Sample — Creating CKEditor Instances
+
+
+
+ This sample shows how to add event handlers to CKEditor with Java.
+
+
+ A snippet of the configuration code can be seen below; check the source code of this page for
+ the full definition:
+
+
+<%
+CKEditorConfig settings = new CKEditorConfig();
+settings.addConfigValue("skin", "office2003");
+EventHandler eventHandler = new EventHandler();
+eventHandler.addEventHandler("instanceReady", "function (ev) { alert(\"Loaded: \" + ev.editor.name); }");
+String value = "Initial value";
+%>
+
+<ckeditor:editor basePath="/ckeditor/" value="<%=value %>" config="<%=settings %>" editor="editor1" events="<%=eventHandler %>"/>
+
+<%
+settings.removeConfigValue("skin");
+settings.addConfigValue("uiColor", "#ADE82E");
+settings.addConfigValue("toolbar", "[['Format'],['Bold','Italic','Underline','Strike','-','Subscript','Superscript']]");
+%>
+
+<ckeditor:replace basePath="/ckeditor/" config="<%=settings %>" replace="editor2" />
+
+
+
+
+
+
+
+
+
+
+
Index: /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/assets/sample_posteddata.jsp
===================================================================
--- /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/assets/sample_posteddata.jsp (revision 6850)
+++ /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/assets/sample_posteddata.jsp (revision 6850)
@@ -0,0 +1,41 @@
+
+
+<%@page import="com.ckeditor.SamplePostData"%>
+<%@page import="java.util.Enumeration"%>
+<%@page language="Java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+
+
+ Sample — CKEditor
+
+
+
+
+
+ CKEditor — Posted Data
+
+
+
+
+
+ Field Name |
+ Value |
+
+
+ <%
+ out.write(new SamplePostData(request).getAllFormFieldsAndValues());
+ %>
+
+
+
+
Index: /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/index.jsp
===================================================================
--- /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/index.jsp (revision 6850)
+++ /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/index.jsp (revision 6850)
@@ -0,0 +1,44 @@
+
+
+
+
+
+ CKEditor Samples — Java Integration
+
+
+
+
+ CKEditor Samples List for Java
+
+
+ Basic Samples
+
+
+
+ Advanced Samples
+
+
+
+
+
Index: /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/replace.jsp
===================================================================
--- /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/replace.jsp (revision 6850)
+++ /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/replace.jsp (revision 6850)
@@ -0,0 +1,68 @@
+
+
+<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>
+<%@page import="java.util.HashMap"%>
+<%@page import="java.util.Map"%>
+<%@page language="Java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+
+
+ Replace Selected Textarea Elements — CKEditor Sample
+
+
+
+
+
+ CKEditor Sample — Replace Selected Textarea Elements Using Java Code
+
+
+
+ This sample shows how to replace a selected <textarea>
element
+ with a CKEditor instance by using Java code.
+
+
+ To replace a <textarea>
element, place the following call at any point
+ after the <textarea>
element:
+
+
+<ckeditor:replace replace="textarea_id" basePath="/ckeditor/" />
+
+ Note that textarea_id
in the code above is the id
attribute of
+ the <textarea>
element to be replaced.
+
+
+
+
+
+
+
+
+
+
+
Index: /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/replaceall.jsp
===================================================================
--- /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/replaceall.jsp (revision 6850)
+++ /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/replaceall.jsp (revision 6850)
@@ -0,0 +1,67 @@
+
+
+<%@page language="Java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>
+
+
+ Replace All Textarea Elements — CKEditor Sample
+
+
+
+
+
+ CKEditor Sample — Replace All Textarea Elements Using JSP tag
+
+
+
+ This sample shows how to replace all <textarea>
elements
+ with CKEditor by using JSP tag.
+
+
+ To replace all <textarea>
elements, place the following call at any point
+ after the last <textarea>
element:
+
+
+<ckeditor:replaceAll basePath="/ckeditor/" />
+
+
+
+
+
+
+
+
+
+
Index: /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/standalone.jsp
===================================================================
--- /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/standalone.jsp (revision 6850)
+++ /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/_samples/standalone.jsp (revision 6850)
@@ -0,0 +1,85 @@
+
+
+<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>
+<%@page import="com.ckeditor.CKEditorConfig"%>
+<%@page import="java.util.ArrayList"%>
+<%@page import="java.util.List"%>
+<%@page import="java.util.HashMap"%>
+<%@page import="java.util.Map"%>
+<%@page language="Java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+
+
+ Creating CKEditor Instances — CKEditor Sample
+
+
+
+
+
+ CKEditor Sample — Creating CKEditor Instances
+
+
+
+
+
+
+
+ This sample shows how to create a CKEditor instance with Java.
+
+
+<%
+String value = "My first <strong>CKEditor</strong> Java tag";
+
+CKEditorConfig settings = new CKEditorConfig();
+settings.addConfigValue("width", "500");
+settings.addConfigValue("toolbar", "Basic");
+%>
+
+<ckeditor:editor basePath="/ckeditor/" config="<%=settings %>" editor="textarea_id" value="<%= value %>"/>
+
+ Note that textarea_id
in the code above is the id
and name
attribute of
+ the <textarea>
element that will be created.
+
+
+
+
+
+
+
Index: /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/index.jsp
===================================================================
--- /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/index.jsp (revision 6850)
+++ /CKEditor.Java/ckeditor-java/tags/3.5.3/src/main/webapp/index.jsp (revision 6850)
@@ -0,0 +1,37 @@
+
+
+
+
+
+ CKEditor for Java — Samples
+
+
+
+
+ CKEditor for Java
+
+
+ The samples of CKEditor integration are available in the _samples folder.
+
+
+ Useful Links
+
+
+
+
+