Hello Everyone,
I've been using a "python wrapper" of the Confluence REST APIs with some success. I'm able to create and update pages and add attachments. I'm attempting to update an existing page by adding a "expand" macro to the HTML.
My use case is:
Run a script that creates and attaches a bunch of attachments to a page (i.e. a template), and then I manually add information to the page rounding out the analysis.
When I add the macro via REST, the macro functions properly, but is "goofed up" when I attempt to edit the page via the UI.
The HTML I am adding to the page via REST :
<div id="expander-432012860"
class="expand-container">
<div id="expander-control-432012860"
class="expand-control">
<span class="expand-control-icon icon"> </span>
<span class="expand-control-text">Expand Title</span>
</div>
<div id="expander-content-432012860"
class="expand-content expand-hidden">
<p>This is the "Expand Body"</p>
</div>
</div>
I think I understand the number portion is a random value. When manually creating a page with an expander, I see the IDs but cannot find the number portion in any other part of the HTML document.
if I "View source" of the newly updated page, I find:
<div class="expand-container">
<div class="expand-control">
<span class="expand-control-icon icon"> </span>
<span class="expand-control-text">Expand Title</span>
</div>
<div class="expand-content expand-hidden">
<p>This is the "Expand Body"</p>
</div>
</div>
I presume the lack of "id"s are causing the issue for the UI editor.
What am I doing wrong?
Thanks in advance!
Larry Schapker