mirror of
https://codeberg.org/AntumLuanti/mod-cleaner.git
synced 2025-03-21 15:41:22 +00:00
LDoc: new tags for embedding videos
This commit is contained in:
parent
9c80a957e3
commit
689f911cb3
1 changed files with 24 additions and 0 deletions
|
@ -28,11 +28,35 @@ new_type("setting", "Settings")
|
||||||
new_type("tool", "Tools")
|
new_type("tool", "Tools")
|
||||||
new_type("json", "JSON Configurations")
|
new_type("json", "JSON Configurations")
|
||||||
|
|
||||||
|
|
||||||
|
local function video_frame(src)
|
||||||
|
return '<iframe width="560" height="315" src="' .. src
|
||||||
|
.. '" title="Video Player" frameborder="0"'
|
||||||
|
.. ' allow="fullscreen;"></iframe>'
|
||||||
|
end
|
||||||
|
|
||||||
custom_tags = {
|
custom_tags = {
|
||||||
{
|
{
|
||||||
"privs",
|
"privs",
|
||||||
title = "Required Privileges",
|
title = "Required Privileges",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"video",
|
||||||
|
title = "Video",
|
||||||
|
format = video_frame,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"youtube",
|
||||||
|
title = "Video",
|
||||||
|
format = function(value)
|
||||||
|
return video_frame("https://www.youtube.com/embed/" .. value)
|
||||||
|
--[[
|
||||||
|
return '<iframe width="560" height="315" src="https://www.youtube.com/embed/'
|
||||||
|
.. value .. '" title="Video Player" frameborder="0"'
|
||||||
|
.. ' allow="fullscreen;"></iframe>'
|
||||||
|
]]
|
||||||
|
end,
|
||||||
|
},
|
||||||
-- settings
|
-- settings
|
||||||
{
|
{
|
||||||
"settype",
|
"settype",
|
||||||
|
|
Loading…
Add table
Reference in a new issue