roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thinkboy <>
Subject I created a plugin for new textile-j library .
Date Sat, 24 Nov 2007 19:01:45 GMT

textile4j has been inactive for a very long time, moreover many major 
features are not supported . (e.g Table)

I found out another new open source java project called textile-J  in  :

it is really great!. it supports , almost, all of the textile syntax. 
very much the same as what I mostly do in Confluence wiki in my daily 
work !!!

now, I can easily sync or copy working notes from confluece wiki to my 
personal Roller blog :-D
so, I created a new Roller Plugin for textile-J to replace the old 
Textile4J altogether in Roller.

Here is my notes to share:
* svn checkout source from   (DO not 
download the jar from "Build Download Area", it does not work !)
* cd textile-j/java/
* $ant all
* will in generated in dist
* I rename ""   as "textilej_1.0.0.jar"
* copy textilej_1.0.0.jar to apache-roller-src-3.1/contrib/lib
* create the following plugin file in 

cd to apache-roller-src-3.1
* /apache-roller-src-3.1$ant all
* /apache-roller-src-3.1/contrib$ant build-contrib
* a roller-contrib.jar will be generated at: 
* copy this roller-contrib.jar to 
* configure your $TOMCAT_HOME/common/classes/

# Weblog entry plugins\
org.apache.roller.ui.rendering.plugins.ConvertLineBreaksPlugin \
,org.apache.roller.ui.rendering.plugins.TopicTagPlugin \
,org.apache.roller.ui.rendering.plugins.ObfuscateEmailPlugin \
,org.apache.roller.ui.rendering.plugins.SmileysPlugin \

source code for
 * Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  The ASF licenses this file to You
 * under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.  For additional information regarding
 * copyright in this work, please see the NOTICE file in the top level
 * directory of this distribution.

package org.apache.roller.ui.rendering.plugins;

import java.util.Map;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.pojos.WeblogEntryData;
import org.apache.roller.pojos.WebsiteData;

 * Render text using textile engine.
public class TextileJPlugin implements WeblogEntryPlugin {

    private static Log mLogger = LogFactory.getLog(TextileJPlugin.class);

    public String name = "TextileJ Formatter";
    public String description = "Allows use of TextileJ formatting to easily ";
    private TextileParser parser = new TextileParser();

    public TextileJPlugin() {
        mLogger.debug("Textile Plugin instantiated.");

    public String getName() {
        return name;

    public String getDescription() {
        return StringEscapeUtils.escapeJavaScript(description);

     * Init.
    public void init(WebsiteData website) {
        // no-op

     * Convert an input string that contains text that uses the Textile
     * syntax to an output string in HTML format.
     * @param src Input string that uses Textile syntax
     * @return Output string in HTML format.
    public String render(WeblogEntryData entry, String src ) {

        String result = parser.parseToHtml(src);
        return result;


View raw message