Module:Lilytest: Difference between revisions
Content added Content deleted
mNo edit summary |
mNo edit summary |
||
Line 9: | Line 9: | ||
:wikitext( 'Link Testtext' ) |
:wikitext( 'Link Testtext' ) |
||
return tostring( mylink ) |
return tostring( mylink ) |
||
end |
|||
function p.htmlx(frame) |
|||
local mylink = mw.html.create( 'a' ) |
|||
mylink |
|||
:attr( 'id', 'testdiv' ) |
|||
:attr( 'href', 'https://publictestwiki.com') |
|||
:attr('target', '_blank') |
|||
:wikitext( 'Link Testtext' ) |
|||
return mylink |
|||
end |
end |
||
Revision as of 20:11, 11 January 2021
Documentation for this module may be created at Module:Lilytest/doc
local p = {}
-- {{#invoke:Lilytest|html}}
function p.html(frame)
local mylink = mw.html.create( 'a' )
mylink
:attr( 'id', 'testdiv' )
:attr( 'href', 'https://publictestwiki.com')
:attr('target', '_blank')
:wikitext( 'Link Testtext' )
return tostring( mylink )
end
function p.htmlx(frame)
local mylink = mw.html.create( 'a' )
mylink
:attr( 'id', 'testdiv' )
:attr( 'href', 'https://publictestwiki.com')
:attr('target', '_blank')
:wikitext( 'Link Testtext' )
return mylink
end
function p.simple(frame)
return '<a href="https://publictestwiki.com" target="_blank">Link Testtext</a>'
end
return p