mirror of
https://github.com/kovetskiy/mark.git
synced 2026-04-25 00:32:35 +00:00
feat: youtube widget macro (#127)
This commit is contained in:
@@ -177,6 +177,18 @@ func templates(api *confluence.API) (*template.Template, error) {
|
||||
`<ac:emoticon ac:name="{{ .Name }}"/>`,
|
||||
),
|
||||
|
||||
/* https://confluence.atlassian.com/doc/widget-connector-macro-171180449.html#WidgetConnectorMacro-YouTube */
|
||||
|
||||
`ac:youtube`: text(
|
||||
`<ac:structured-macro ac:name="widget">{{printf "\n"}}`,
|
||||
`<ac:parameter ac:name="overlay">youtube</ac:parameter>{{printf "\n"}}`,
|
||||
`<ac:parameter ac:name="_template">com/atlassian/confluence/extra/widgetconnector/templates/youtube.vm</ac:parameter>{{printf "\n"}}`,
|
||||
`<ac:parameter ac:name="width">{{ or .Width "640px" }}</ac:parameter>{{printf "\n"}}`,
|
||||
`<ac:parameter ac:name="height">{{ or .Height "360px" }}</ac:parameter>{{printf "\n"}}`,
|
||||
`<ac:parameter ac:name="url"><ri:url ri:value="{{ .URL }}" /></ac:parameter>{{printf "\n"}}`,
|
||||
`</ac:structured-macro>{{printf "\n"}}`,
|
||||
),
|
||||
|
||||
// TODO(seletskiy): more templates here
|
||||
} {
|
||||
templates, err = templates.New(name).Parse(body)
|
||||
|
||||
Reference in New Issue
Block a user