kovetskiy / mark

Sync your markdown files with Confluence pages.
https://samizdat.dev
Other
988 stars 147 forks source link

Panel Macro #333

Closed kedarv closed 1 year ago

kedarv commented 1 year ago

Is your feature request related to a problem? Please describe. I'd like to be able to use the Panel Macro: https://confluence.atlassian.com/conf717/panel-macro-1115675967.html

Is it possible within the current constructs of the macro syntax? or would it need to be implemented?

mrueg commented 1 year ago

I've added a macro in https://github.com/kovetskiy/mark/pull/337 please give it a try.

kedarv commented 1 year ago

Thanks @mrueg , I was able to get a basic example working. But, I'm not sure how to construct the Macro such that I can include "complex" content inside of it, like lists and text line breaks. Here is how I am using the Macro so far:

<!-- Macro: :panel:([^:]+):([^:]+):(.+):(.+):(.+):(.+):
     Template: ac:panel
     Title: ${1}
     Body: ${2}
     BGColor: ${3}
     TitleBGColor: ${4}
     TitleColor: ${5}
     BorderStyle: ${6} -->

:panel:some title:some body content:#FAF9F8:#3178C6:#FFFFFF:none:

am I misunderstanding how to use macros? I would like to do something like


:panel:some title:some body 
- a
- b
- c
:#FAF9F8:#3178C6:#FFFFFF:none:```
sheldonhull commented 4 months ago

@kedarv did you ever figure out how to do what you mentioned here?

kedarv commented 4 months ago

@kedarv did you ever figure out how to do what you mentioned here?

not really :/ I ended up just using the raw confluence markup in my documents

sheldonhull commented 4 months ago

Mind sharing a snippet? I tried multline in a few ways to create a custom panel and couldn't get it to work.

kedarv commented 4 months ago

ah I'm misremembering what I used confluence markup for, it was for <ac:structured-macro ac:name="expand"> but I imagine the panel/alert should work similarly