Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | GluePlugin<-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/GluePluginEnable TML (TWiki Markup Language) to span multiple lines
On this page:
Description
This plugin will help you to write readable markup (TWikiMarkup, HMTL, ...) within TWiki by allowing tags and arguments to be formatted on multiple lines. This is done by removing whitespaces surrounding tilde characters at the beginning of a line and recombine consecutive lines again. Basically, there are two ways of glueing and recombining lines by either removing all whitespaces between two lines using While these glue sequences might feel strange at the beginning they help you to format and recognize your markup and make it more readable. That way you will be able to format a TWikiApplications that looked like this
%SEARCH{"..." type="query" header="<table width="100%" border="5px"><thead><tr><th>Name</th><th>Description</th><th>Date</th></tr></thead>" format="<tr><th>$formfield(Name)</th><th>$summary</th><th>$createdate</th></tr>" footer="</table>"}% somewhat like this
#~~ ################################# #~~ # This is my new TWikiApplication ~~~ %~~ SEARCH{ #~~ ################################# #~~ # this is the search expression ~~~ "..." ~~~ ~~~ type="query" ~~~ #~~ ################################# #~~ # this is the header of the result table ~~~ ~~~ header=" ~~~ <table ~~~ width="100%" ~~~ border="5px" ~~~ > ~~~ <thead> ~~~ <tr> ~~~ <th>Name</th> ~~~ <th>Description</th> ~~~ <th>Date</th> ~~~ </tr> ~~~ </thead>" #~~ ################################# #~~ # every row will be formatted like this ~~~ ~~~ format=" ~~~ <tr> ~~~ <th>$formfield(Name)</th> ~~~ <th>$summary</th> ~~~ <th>$createdate</th> ~~~ </tr>" #~~ ################################# #~~ # and finally we close this html table ~~~ ~~~ footer="</table>" ~~~ }% #~~ ################################# #~~ # sure we could have used #~~ # | TWikiTables | as well | #~~ # but these aren't robust against newlines #~~ # in the $summary field #~~ #################################
Syntax
The <space> is a literal whitespace blank. The %~~ TAG{ ~~~ key=" *~~ hello ~~~ world *~~ " ~~~ }%which will be recombined to %<nop>TAG{ key="hello world" }%
Examples
Plugin Installation Instructions
Plugin Info
<-- provided for compatibility only
Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences |