mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-23 21:32:41 +08:00
stdlib: Add multimedia macro
This commit is contained in:
parent
63ebfb853c
commit
1e91fe184f
@ -477,6 +477,11 @@ By default, mark provides several built-in templates and macros:
|
|||||||
* Width: Width of the column
|
* Width: Width of the column
|
||||||
* Body: The content of the column
|
* Body: The content of the column
|
||||||
|
|
||||||
|
* template: `ac:multimedia` to embedd an attached video, animation or other multimedia files in a Confluence page
|
||||||
|
* Name: Name of the file
|
||||||
|
* Width: Width of the video (optional)
|
||||||
|
* AutoPlay: Start playing the file on page load (default: false)
|
||||||
|
|
||||||
* macro `@{...}` to mention user by name specified in the braces.
|
* macro `@{...}` to mention user by name specified in the braces.
|
||||||
|
|
||||||
## Template & Macros Usecases
|
## Template & Macros Usecases
|
||||||
|
@ -435,6 +435,16 @@ func templates(api *confluence.API) (*template.Template, error) {
|
|||||||
`<ac:rich-text-body>{{ or .Body "" }}</ac:rich-text-body>`,
|
`<ac:rich-text-body>{{ or .Body "" }}</ac:rich-text-body>`,
|
||||||
`</ac:structured-macro>`,
|
`</ac:structured-macro>`,
|
||||||
),
|
),
|
||||||
|
/* https://confluence.atlassian.com/conf59/multimedia-macro-792499140.html */
|
||||||
|
`ac:multimedia`: text(
|
||||||
|
`<ac:structured-macro ac:name="multimedia">`,
|
||||||
|
`<ac:parameter ac:name="width">{{ or .Width 500 }}</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="name">`,
|
||||||
|
`<ri:attachment ri:filename="{{ .Name }}/>`,
|
||||||
|
`</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="autoplay">{{ .AutoPlay "false"}}</ac:parameter>`,
|
||||||
|
`</ac:structured-macro>`,
|
||||||
|
),
|
||||||
|
|
||||||
// TODO(seletskiy): more templates here
|
// TODO(seletskiy): more templates here
|
||||||
} {
|
} {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user