mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-23 21:32:41 +08:00
ac:image
This commit is contained in:
parent
b82e18f8b8
commit
8debc23476
@ -84,6 +84,13 @@ func templates(api *confluence.API) (*template.Template, error) {
|
||||
"]]><![CDATA[]]]]><![CDATA[>",
|
||||
)
|
||||
},
|
||||
"convertAttachment": func(data string) string {
|
||||
return strings.ReplaceAll(
|
||||
data,
|
||||
"/",
|
||||
"_",
|
||||
)
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
@ -210,6 +217,9 @@ func templates(api *confluence.API) (*template.Template, error) {
|
||||
`ac:emoticon`: text(
|
||||
`<ac:emoticon ac:name="{{ .Name }}"/>`,
|
||||
),
|
||||
`ac:image`: text(
|
||||
`<ac:image ac:align="center" ac:layout="center"><ri:attachment ri:filename="{{ .Attachment | convertAttachment }}"/></ac:image>`,
|
||||
),
|
||||
|
||||
/* https://confluence.atlassian.com/doc/widget-connector-macro-171180449.html#WidgetConnectorMacro-YouTube */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user