You can edit almost every page by Creating an account and confirming your email.

Module:Sandbox/Erutuon/HTML

From EverybodyWiki Bios & Wiki
Revision as of 16:28, 30 May 2019 by WikiMasterBot2 (talk | contribs) (WikiMasterBot2 replicate_wiki.py synchronization from wikipedia:en)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Sandbox/Erutuon/HTML/doc

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