Title | EditorProviders |
Date | 20-Sep-2005 11:57:33 EEST |
JSPWiki version | 2.2.33 |
Submitter | ChristophSauer |
Idea Category | ProviderIdea |
Reference | |
Idea Status | NewIdea |
Editor Providers would enables editor developers to embedd their editors into JSPWiki with a simple Interface.
It uses a Factory class named EditorManager which would instanciate an EditorProvider of a certain type, indicated in the jspwiki.properties file by the jspwiki.editor property. For Example
jspwiki.editor=com.ecyrd.jspwiki.editors.WikiWizard
An editor provider implements the EditorProvider interface which has the following three methods:
- createIncludes() - Incldes needed by the editors (JavaScript includes)
- createEditorArea() - The area where to type in the text
- createButtons() - The submit buttons
Here's an example code snipped which would be used in the doEndTag() method of the EditorAreaTag to create a generic editor area
EditorManager em = new EditorManager(pageContext, getBodyContent() ); EditorProvider provider = em.createProvider(); pageContext.getOut().print( provider.createEditor().toString() );
In order to implement the EditorProvider interface two new tags are needed:
The EditorAreaTag and EditorTag will have to be modified to use the new EditorProvider Interface.
Add new attachment
Only authorized users are allowed to upload new attachments.
List of attachments
Kind | Attachment Name | Size | Version | Date Modified | Author | Change note |
---|---|---|---|---|---|---|
png |
editorproviders.png | 13.0 kB | 1 | 20-Sep-2005 11:59 | ChristophSauer |