Radeox plugin
Dependency :
compile ":radeox:0.1"
Summary
Description
Radeox plugin
def title = 'A plugin for the Radeox Wiki-render engine to allow easy markup and cross-linking.' def author = 'Dierk Koenig' def authorEmail = 'dierk.koenig at canoo.com' def description = ''' The Radeox plugin provides a new tag <g:radeoxRender> some content </g:radeoxRender> that processes the inlined content according to the Radeox Wiki Format, including directives like _bold_ and ~~italic~~ but also more advanced macros like"error">table: TableMacro: missing table contentand
| Macro | Parameters | Description |
|---|---|---|
| anchor | No Parameters. | |
| api | 1: class name, e.g. java.lang.Object or java.lang.Object@Java131 2: mode, e.g. Java12, Ruby, defaults to Java" (optional) | Generates links to Java or Ruby API documentation. |
| api-docs | No Parameters. | Displays a list of known online API documentations and mappings. |
| asin | 1: ASIN number of the DVD or CD | Generates links to DVD/CD dealers or comparison services. Configuration is read from conf/asinservices.txt. |
| code | 1: syntax highlighter to use, defaults to java (optional) | Displays a chunk of code with syntax highlighting, for example Java, XML and SQL. The none type will do nothing and is useful for unknown code types. |
| file-path | 1: a Windows or UNIX file path | Displays a file system path. The file path should use slashes. Defaults to Windows. |
| hello | 1: name to print | Say hello example macro. |
| info | No Parameters. | |
| inter-wiki | No Parameters. | Displays a list of known InterWiki mappings. |
| isbn | 1: ISBN number of a book or magazine | Generates links to book dealers or comparison services. Configuration is read from conf/bookservices.txt. |
| link | 1: The text to appear as a link (optional) 2: The URL to generate a hyperlink to 3: none if the external link image should not appear (optional) | Generate a weblink. |
| list-of-macros | No Parameters. | Displays a list of available macros. |
| mailto | 1: an Email address | Displays an email address. |
| note | No Parameters. | |
| quote | 1: source text (optional) 2: displayed description (default is "Source") (optional) | Display quotations. |
| rfc | 1: the RFC number to link to | Generates links to RFCs. |
| table | No Parameters. | Displays a table. |
| warning | No Parameters. | |
| xref | 1: class name, e.g. java.lang.Object or java.lang.Object@Nanning" 2: line number (optional) | Generates links to Java Xref source code. |
Usage in Grails
Main usage scenarios for this plugin in a Grails application:- you are developing a Wiki based on Grails
- part of your Grails app should have a wiki like behaviour (including automatic internal links)
- you want to allow users to use radeox markup in plain text fields (no internal links needed)
- you want to use radeox markup in your GSP pages or other rendering logic for convenience
How to customize
As of the current version (0.1) you best look into the provided artifacts ||location||artifact||note|| |domain| Page.groovy| Sample domain class that uses the plugin in a simple Wiki. | |taglib| RadeoxTagLib.groovy| Provides the <g:radeoxRender> tag and wires up the engine. Register more filters or macros here. Adapt Radeox config here. | |utils| GrailsWikiEngine.groovy| Hook to specify how internal wiki links should work in you Grails app. Adapt as needed. | |views| page/* | Sample views that use the new tag in a simple Wiki. | |utils| GroovyMacro.groovy| Custom macro example. |The code is pretty small and easy to adapt.Still to do:
- webtests for the plugin (not sure how to do that...)
- url mapping from app/page/show/$id to app/$name
- enhance GroovyMacro to execute the contained code in a sandbox
- make a Google-suggest-like sidebar for known page names
- PageNameService that does name-to-id mapping with caching
- backlinks ('who links to this page?')
Known issues:
- requires grails 0.5.5