01: package com.ecyrd.jspwiki.plugin;
02:
03: import com.ecyrd.jspwiki.*;
04:
05: import java.util.*;
06:
07: /**
08: * Implements a simple plugin that just returns a piece of Javascript
09: * <P>
10: * Parameters: text - text to return.
11: *
12: * @author Janne Jalkanen
13: */
14: public class JavaScriptPlugin implements WikiPlugin,
15: InitializablePlugin {
16: protected static boolean c_inited = false;
17:
18: public String execute(WikiContext context, Map params)
19: throws PluginException {
20: return "<script language=\"JavaScript\"><!--\nfoo='';\n--></script>\n";
21: }
22:
23: public void initialize(WikiEngine engine) throws PluginException {
24: c_inited = true;
25: }
26:
27: }
|