Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create HTML table using python sdk

Ben Zecharia February 28, 2022

Hi, 

 

I am trying to display HTML table in confluence page, confluence is showing the code instead of the table. 

 

```

def confluence_page_update(environment, html_content):
conf_site = ""
conf_user = ""
conf_pass = ""
page_title = "HTML-GENERATOR-TEST"
page_space = "IPD"
conf = Confluence(url=conf_site, username=conf_user, password=conf_pass)
# resolve page ID
page_id = conf.get_page_id(page_space, page_title)
# new page content
# update page with new content
conf.update_page(page_id, page_title, escape(html_content), parent_id=None, type='page', representation='wiki', minor_edit=False)

```

 

Html table example:

```

<table>
<colgroup><col/><col/><col/></colgroup>
<tbody>
<tr>
<th>Namespace</th>
<th>Resource</th>
<th>Available Keys</th>
<th>Values</th>
</tr>
</tbody>
</table>

``` 

 

I have a working script the do the same through rest-api but since I migrating it to lambda-python, I want to use python confluence sdk.

Any idea what I am missing? 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events