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秒寫道: