f = {} function f.HTML_table(frame) local cell_content = mw.text.split ( frame.args[1], '%s' ) local cell_colors = mw.text.split ( frame.args[2], '%s' ) local t = mw.html.create("table") t:addClass("wikitable") local tr = t:tag("tr") for i in pairs(cell_content) do td = tr:tag("td") td :wikitext(cell_content[i]) :cssText("color: " .. cell_colors[i] .. ";") end return tostring(td:allDone()) end return f |