Using curl, I am trying to publish confluence pages in editor value v2, with text aligned in the centre.
The template json structure used to push via curl is as follows. Items marked with XXXXX represent a string that is hidden for integrity reasons.
Hello @Luke McKavanagh
If you read the documentation for ADF, it says "Some of these nodes can take marks that define text formatting or embellishment such as centered, bold, italics, and alike"
However, in the list of marks, there is no mention of how to declare centered content. Grrr... incomplete documentation!
So, you have to reverse engineer how to implement centering by creating a page in Confluence that has some centered text, then using the REST API to query that page's content and return the page body in ADF format, which gives a result something like this:
"body": {
"atlas_doc_format": {
"value": "{"type":"doc","content":[{"type":"paragraph","marks":[{"type":"alignment","attrs":{"align":"center"}}],"content":[{"text":"This is centered text","type":"text"}]}],"version":1}"
So, now you know you need to specify a mark of the type alignment with an attribute 'align' with the value 'center' for the content to be centered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.