|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecyrd.jspwiki.modules.ModuleManager
com.ecyrd.jspwiki.ui.EditorManager
public class EditorManager
Defines an editor manager. An editor can be added by adding a suitable JSP file under templates/default/editors If you want your editor to include any scripts or something, you can simply request it by adding the following in your ini/jspwiki_module.xml:
Janne Jalkanen foo.css editors/myeditor.jsp
Field Summary | |
---|---|
static String |
ATTR_EDITEDTEXT
Known attribute name for storing the user edited text inside a session or a page context |
static String |
EDITOR_PLAIN
Known name for the plain wikimarkup editor. |
static String |
EDITOR_PREVIEW
Known name for the preview editor component. |
static String |
PARA_EDITOR
Parameter for changing editors at run-time |
static String |
PROP_EDITORTYPE
The property name for setting the editor. |
static String |
REQ_EDITEDTEXT
Known attribute name for storing the user edited text inside a HTTP parameter. |
Fields inherited from class com.ecyrd.jspwiki.modules.ModuleManager |
---|
PLUGIN_RESOURCE_LOCATION |
Constructor Summary | |
---|---|
EditorManager()
|
Method Summary | |
---|---|
static String |
getEditedText(javax.servlet.jsp.PageContext ctx)
Convenience function which examines the current context and attempts to figure out whether the edited text is in the HTTP request parameters or somewhere in the session. |
String[] |
getEditorList()
Returns a list of editors as Strings of editor names. |
String |
getEditorName(WikiContext context)
Returns an editor for the current context. |
String |
getEditorPath(WikiContext context)
Convenience method for getting the path to the editor JSP file. |
void |
initialize(WikiEngine engine,
Properties props)
Initializes the EditorManager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_EDITORTYPE
public static final String PARA_EDITOR
public static final String EDITOR_PLAIN
public static final String EDITOR_PREVIEW
public static final String REQ_EDITEDTEXT
public static final String ATTR_EDITEDTEXT
Constructor Detail |
---|
public EditorManager()
Method Detail |
---|
public void initialize(WikiEngine engine, Properties props)
engine
- The WikiEngine we're attached to.props
- Properties for setup.public String getEditorName(WikiContext context)
Determines the editor to use by the following order of conditions: 1. Attribute in HttpSession: used when an alternative editor has been chosen 2. Editor set in User Preferences (not yet implemented) 3. Default Editor set in jspwiki.properties
For the PREVIEW context, this method returns the "preview" editor.
context
- The context that is chosen.
public String[] getEditorList()
public String getEditorPath(WikiContext context)
context
-
public static String getEditedText(javax.servlet.jsp.PageContext ctx)
ctx
- the JSP page context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |