Last edited by OnegWR: Modified links pointing to docs server
What
This formatter would allow you to convert inline csv data into a table.
Example
The code:
%%(csv)
;***a***;"***b***";***c***
***1***;d;"e";f
#test
***2***;g;;h
***3***;I;J;"K"
%%
Would give this as result:
a
b
c
1
d
e
f
2
g
h
3
I
J
K
Features
Alternating row background. (hint: only use odd/even lines for a fast alternative layout)
Ignores empty lines or lines starting with an '#' (comments).
To not disturb the alternated layout: add 2 (comment)lines...
The " before and after a cell is auto-removed.
You can make the background darker by wrapping the cell in "***"-tags.
To Do
Add more cell options: alignment, bold, Italic, ...
Find a way to implement a "\n" in a cell (every call to $this->Format() is another include of formatters/wakka.php, so I would like to find another way...)
Fix the ';' in a cell (>,...)
Use more CSS classes
Installation
Copy the code below into a file named formatters/csv.php
And give it the same file permissions as the other files in that directory.