https://joshuafontany.github.io/TW5-RenderTablePlugin/

I have written a plugin to render HTML +wikitext tables. This is another 
shot at some of the functionality I liked from previous table rendering 
methods, and some new functions.

The .js widget that serves as a parent to each table takes a "schema" 
parameter, which defines the table's fields (columns), layout 
(headers/footers), and dataset (mode, datafilter, and datapath 
paramethers). There is some basic documentation and macro examples up on 
the example wiki.

Some of the cooler things I got this plugin to do are:
- Responsive layout (scroll bars if the table contents would otherwise 
spill outside the story river).
- Templates - each column can have an optional template tiddler (instead of 
rendering the field defined for the column).
- The widget does not change the <<currentTiddler>> variable. It adds a few 
new variables to handle each data-row's templates (or field contexts if it 
is wikitext):
 -- <<rowtiddler>> = the tiddler that this row's data is pulled from.
 -- <<rowpath>> = the prefix of the current <<fieldname>> variable
 -- <<fieldname>> = the current column's field plus the <<rowpath>> 
variable.
- Sorting by Wikified cell contents (the widget handles wikifying each cell 
of the column and sorting the row entities).
 -- Sorting does not update with changes to the wikistore, so it should be 
re-run each time the data is needed (new rows are sorted to the bottom).
- Filtering by Wikified row contents (the widget handles wikifying each rpw 
of the table and filters it with the provided Regex parameter). 
 -- Filtering does not update with changes to the wikistore, so should be 
re-run each time the data is needed.
- Able to use the same <<table>> in ViewTemplates and EditTemplates to 
render responsive UI elements (see advanced example).

Thanks for checking this out! (& Double Thanks if I grabbed code or ideas 
from you - like the BarChart plugin!!)

Best,
Joshua Fontany

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e949e2f6-8279-4615-b663-c0af39181824%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to