Hi,
I want to add any of the above panels when pasting markdown to editor, is this possible?
e.g. I want to change this note to be a confluence panel note:
```
### I'm a Markdown file
Some more markdown text...
> NOTE: Hello, I'm a nice note
What should I paste to achieve this?
ref: https://support.atlassian.com/confluence-cloud/docs/insert-the-info-tip-note-and-warning-macros/#Wiki-markup-example
It turns out that it's possible in the following implementation:
1. Script must look for some defined custom structure inside our markdown file, e.g.
!!! tip useful-tip block of text that is in the tip macro
2. We change this to macro body written in html, e.g. (haven't tested)
<ac:structured-macro ac:name="tip"> <ac:parameter ac:name="title">useful tip</ac:parameter> <ac:parameter ac:name="body">block of text that is in the tip macro</ac:parameter></ac:structured-macro>
And send to confluence space as a new page or update the existing one.
If someone reads this, it also works (lack of documentation!!!) for fenced code blocks and other macros, just change:
``` Javasome code```
to
<ac:structured-macro ac:name="code"> <ac:parameter ac:name="language">Java</ac:parameter> <ac:plain-text-body><![CDATA[some code]]></ac:plain-text-body></ac:structured-macro>
cheers
Hi @Maciej Kopa
What exactly do you want to achieve? The way you can add a panel is by either clicking on + on the header and choosing Info, or by typing / and then info.
Hi @Alex Koxaras -Relational-
I want to achieve what you have said, but via API, not Confluence page manually.
You should be able to update content with this endpoint
PUT /wiki/rest/api/content/{id}
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content/#api-wiki-rest-api-content-id-put
See this as well
https://developer.atlassian.com/cloud/confluence/rest-api-examples/#update-a-page
It looks like you're new here. Sign in or register to get started.