Confluence wiki format put new paragraph

时间:2018-07-25 05:17:53

标签: confluence confluence-rest-api

I'd like to put empty linespace (<p></p> in HTML) in Confluence wiki result, but failed whatever I tried.

Based on the the document, it said two carriage-return will put <p></p> but \r\r, \n\n, \n\n\n\n, etc.trials are not working at all.

POST http://wiki.mysite.com/rest/api/content

{"type":"page","title":"new page1","ancestors":[{"id":390668024}], "space":{"key":"EXAMPLE"},"body":{"storage":{"value":"[Some link|http://example.com/url] - Show page.\n\nbq. Query by [Some link info|http://example.com/reference?id=214]","representation":"wiki"}}}

With above REST request, I'd like to show as below format;

Some link - Show page.

<blank line>

Query by Some link info

Some trials (between words Show page. and bq. Query by)

  • \n\n => Show page.</p>\n\n<blockquote><p>Query by
  • \\\\ => Show page. <br class=\"atl-forced-newline\" /> bq. Query by

1 个答案:

答案 0 :(得分:0)

下面的试验给出了预期的结果

Show page.\n\n \\\\ \nbq. Query by

=> Show page.</p>\n\n<p> <br class=\"atl-forced-newline\" /> </p>\n<blockquote><p>Query by