add view-file template

This commit is contained in:
hypengw 2026-01-15 11:01:00 +08:00 committed by Manuel Rüger
parent 5270864d7c
commit 5bb400cf51

View File

@ -451,6 +451,15 @@ func templates(api *confluence.API) (*template.Template, error) {
`<ac:parameter ac:name="autoplay">{{ or .AutoPlay "false"}}</ac:parameter>`, `<ac:parameter ac:name="autoplay">{{ or .AutoPlay "false"}}</ac:parameter>`,
`</ac:structured-macro>`, `</ac:structured-macro>`,
), ),
/* https://confluence.atlassian.com/conf59/view-file-macro-792499226.html */
`ac:view-file`: text(
`<ac:structured-macro ac:name="view-file">`,
`<ac:parameter ac:name="name">`,
`<ri:attachment ri:filename="{{ .Name | convertAttachment }}"/>`,
`</ac:parameter>`,
`<ac:parameter ac:name="height">{{ or .Height 250 }}</ac:parameter>`,
`</ac:structured-macro>`,
),
// TODO(seletskiy): more templates here // TODO(seletskiy): more templates here
} { } {