0

我正在使用来自 atlassia-python-api 的 Confluence 模块来创建一个我想将 html 作为内容传递的页面。是否可以为该 html 添加图像和引导 CDN?

这是我的代码

title = "test page"
content = """<table id="mytable">
              <th>header1</th>
              <th>header2</th>
           <tr>
              <td>R1C1</td>
              <td>R2C2</td>
           </tr>
           <tr>
              <td>R2C1</td> 
              <td>R2C2</td>
           </tr>
        </table>"""

Bootstrap_html = """<script>
                    $(document).ready(function(){
                    $('#myTable').dataTable();});
                 </script>
                 <script 
src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
                 <script type="text/javascript" 
src="http://cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js"></script>
                  <script type="text/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>"""

content = bootstrap_html+content
confluence.create_page(SPACE, title, content, type=blogpost)

如果我不添加引导文件但添加 <script 标签后它会给出 400 错误,它工作正常。如何将来自另一个网站的图像/来源/文件添加到此 html 中?

还是有任何其他方法可以对该表进行分页,因为它将有 200 多个条目?

另外我想添加标签我应该在哪里放置 png 文件来渲染?

4

0 回答 0