Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Module wikitext: Difference between revisions

From Poets.Wiki
Created page with "local p = {} p.text = '' function p.main() return p.text end function p._addText(text, preprocessFrame) if preprocessFrame ~= false then text = (preprocessFrame or mw.getCurrentFrame()):preprocess(text) end p.text = p.text .. text end return p"
 
m Protected "Module:Module wikitext": Initial wiki setup ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
 
(No difference)

Latest revision as of 18:41, 3 March 2025

This page uses Creative Commons Licensed content from Wikipedia (view authors).

Usage

This is an auxiliary module used to allow module pages to display wikitext. Use it by setting this module's text value to whatever content you want to display. The _addText helper method may be useful. For example, to tag a module with {{db-g7}}, put require('Module:Module wikitext')._addText('{{db-g7}}') at the top of it.



local p = {}

p.text = ''

function p.main()
	return p.text
end

function p._addText(text, preprocessFrame)
	if preprocessFrame ~= false then
		text = (preprocessFrame or mw.getCurrentFrame()):preprocess(text)
	end
	p.text = p.text .. text
end

return p
Contents