Hi,
Could anyone else kindly advise how to change the code so to put <caption>
outside <tbody>?
Below seems to be the code to create the <tbody> element (pardon for my
super novice JS knowledge):
> config.formatters.push({
> name: 'enhancedTable',
> match: '^\\{\\|',
> handler: function(w) {
> var pair =
> MediaWikiTemplate.findTableBracePair(w.source,w.matchStart);
> if(pair.start==w.matchStart) {
> w.nextMatch = w.matchStart;
> var table = MediaWikiTemplate.createElement(w.output,'table');
> var tbody = MediaWikiTemplate.createElement(table,'tbody'); //
> required for IE
> var mwt = new MediaWikiTemplate();
> mwt.wikifyTable(tbody,w,pair);
> }
> }
> });
>
As we can see, the original code seems to create a <tbody> with the same
content of the whole tiddler source part to be wikified, and the scope
seems to be the same as the <table> element, thus incorporating the
<caption> element too.
And below there's surely a section of code to create the <caption> element.
How can I modify the code so that the final <caption> can be created
outside of <tbody> instead of inside of it?
Any suggestion is appreciated, thanks!
G.J.Robert於 2012年8月1日星期三UTC+8下午3時45分35秒寫道:
>
> (Is Mr. Martin Budden still here?)
>
> Hi Martin,
>
> Could you kindly check
> http://gjrobert-test.tiddlyspace.com/tiddlers.wiki#%5B%5BTable%20captions%20of%20MediaWikiTableFormatterPlugin%20and%20TiddlyWiki%20default%20markup%5D%5D?
>
> It seems that the default TiddlyWiki markup makes the <caption> element
> inside the <table> but independent of <tbody>, while
> MediaWikiTableFormatterPlugin puts <caption> inside <tbody>, so the caption
> only occupies the width of a column, not the width of the whole table.
>
> Perhaps we can check the code of the plugin? This formatter is such a
> useful one, which makes multi-line content more surviving.
>
> Thank you all.
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/tiddlywiki/-/OAJGc8Tb1E0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.