From 8debc23476e1f23a73ac28702f75fc4e65a20943 Mon Sep 17 00:00:00 2001 From: Sylvain Malnuit Date: Tue, 28 Sep 2021 15:00:13 +0200 Subject: [PATCH 1/3] ac:image --- pkg/mark/stdlib/stdlib.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/mark/stdlib/stdlib.go b/pkg/mark/stdlib/stdlib.go index 578c269..b328e2d 100644 --- a/pkg/mark/stdlib/stdlib.go +++ b/pkg/mark/stdlib/stdlib.go @@ -84,6 +84,13 @@ func templates(api *confluence.API) (*template.Template, error) { "]]>", ) }, + "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:image`: text( + ``, + ), /* https://confluence.atlassian.com/doc/widget-connector-macro-171180449.html#WidgetConnectorMacro-YouTube */ From e0222ae6bd13f260513a9ed84cc261d6ae15b932 Mon Sep 17 00:00:00 2001 From: Fethbita Date: Sat, 4 Feb 2023 15:20:21 +0200 Subject: [PATCH 2/3] Add ac:image width and edited README.md --- README.md | 16 ++++++++++++++++ pkg/mark/stdlib/stdlib.go | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fe70ac9..0239822 100644 --- a/README.md +++ b/README.md @@ -494,6 +494,22 @@ This is a [link to an existing confluence page](ac:Pagetitle) And this is how to link when the linktext is the same as the [Pagetitle](ac:) ``` +### Add width for an image + +Use the following macro: +```markdown + +``` +And attach any image with the following +```markdown +![Example](../images/example.png) +``` +The width will be the commented html after the image (in this case 300px). + + ## Installation ### Homebrew diff --git a/pkg/mark/stdlib/stdlib.go b/pkg/mark/stdlib/stdlib.go index b328e2d..f4d9391 100644 --- a/pkg/mark/stdlib/stdlib.go +++ b/pkg/mark/stdlib/stdlib.go @@ -218,7 +218,7 @@ func templates(api *confluence.API) (*template.Template, error) { ``, ), `ac:image`: text( - ``, + ``, ), /* https://confluence.atlassian.com/doc/widget-connector-macro-171180449.html#WidgetConnectorMacro-YouTube */ From 24aa73e243517d56eaf161d0ddbf74d213b15599 Mon Sep 17 00:00:00 2001 From: Fethbita Date: Mon, 13 Feb 2023 16:46:06 +0200 Subject: [PATCH 3/3] Add width keyword for html comment --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0239822..ad2ea61 100644 --- a/README.md +++ b/README.md @@ -498,14 +498,14 @@ And this is how to link when the linktext is the same as the [Pagetitle](ac:) Use the following macro: ```markdown - ``` And attach any image with the following ```markdown -![Example](../images/example.png) +![Example](../images/example.png) ``` The width will be the commented html after the image (in this case 300px).