Wiki News Projects Sources Tasks New Task Reports
TinyMceJar
Roadmap History

TinyMCE.jar Project


The target for this project is simplify including of excellent TinyMCE into Java/JSP/JSF based project.

Project provide single jar, that can be included into project with simplest configuration in web.xml and allow easy use it in jsp/jsf pages.

Project licensed under LGPL license and contains source code of TinyMCEs

SVN url for project sources is http://svn.emforge.org/svn/emforge/tinymce-jar/trunk

It's simpler to operate with one jar lib either with couple of files, it's the first reason of this project and the second is to provide gzipping of js code out-of-the-box.

How to use it in your project:

  1. Add library:
    1. If you use maven for project building then add EmForge maven repository to your project: just add <repositories> ... <!-- EmForge Repository --> <repository> <id>emforge.org</id> <url>http://svn.emforge.org/svn/emforge/mvnrepo</url> </repository> </repositories> to pom.xml file and add dependency to project: add the few lines </dependencies> ... <dependency> <groupId>org.emforge</groupId> <artifactId>tinymce</artifactId> <version>2.1.3</version> </dependency> </dependencies> to pom.xml file.
    2. Otherwise, just download tinymce-2.1.3.jar from http://svn.emforge.org/svn/emforge/mvnrepo/org/emforge/tinymce/2.1.3/ (there you also can find sources) and put jar into WEB-INF/lib dir of your application.
  2. Configure gzipping servlet in web.xml like this: ... <servlet> <display-name>TinyMCE Loader Servlet</display-name> <servlet-name>TinyMCELoaderServlet</servlet-name> <servlet-class>org.emforge.tinymce.TinyMceLoaderServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>TinyMCELoaderServlet</servlet-name> <url-pattern>/resources/scripts/tiny_mce/*</url-pattern> </servlet-mapping> ...
and use TinyMCE as usual!
<a4j:loadScript src="resources/scripts/tiny_mce/tiny_mce_gzip.js" type="text/javascript"/>
<script type="text/javascript">
    // <![CDATA[
    tinyMCE_GZ.init({
        mode : "none",
        theme : "simple",
        disk_cache : true,
        debug : false,
        convert_urls : false
    });
    // ]]>
</script>
Comments (0)
Login to add comment