How to indent content with new page format (2019)

While attempting to help maintain a community project which helps publish documents onto Confluence, I noticed that pages appear to be styled different. From what I gather, Atlassian has started to introduce various styling changes to Confluence Cloud and (I assume) will be introduced in the next Confluence v7 stable release.

One of the issues (of many) observed is that Atlassian appears to have dropped the ability to indent content from their WYSWYG editor. I do see numerous individuals mentioning this limitation in various issues (which may or may not be resolved; e.g. CONFCLOUD-65755), but my current focus right now is capabilities provided via storage-format. From what I can tell (when publishing to new Confluence Cloud pages), the style attribute on elements appear to be sanitized more aggressively now (if not completely). Before, the following minimized example would show expected indentation of content:

<div style="margin-left: 30px;">
    <div style="margin-left: 30px;">test2</div>
<div style="margin-left: 30px;">test3</div>

When attempting to publish the same content now, styling appears to be removed in the final rendering. The following shows a rendered result of what was working before to what happens now:

I am curious to know if anyone knows of a workaround related to this or know if capabilities such as style overrides are planned to be permanently removed? I am a bit bewildered on how to deal with this new limitation.

1 Like

Have you seen this issue?
Div, Span, Style macros have been depreciated.

@james.dellow, thanks for the response.

My focus is on indenting storage format elements (like div, etc.), not specifically using macros. When this issue was brought up, new REST content was publishing under the new “fabric” style. It appears after a couple of days/weeks later, Atlassian adjusted REST calls to published content using the legacy formatting (which styles/alignments can be applied properly). It still appears to be the case (2020-02-11). If content is created using the online editor, it will use the fabric style – and REST update calls on that page will still use the new fabric style.

From what I can tell, publishing with the atlas_doc_format representation will publish pages in the Atlassian Document Format. I am under the suspicion that this is the long term goal for documentation representation (correct me if I am wrong). Unfortunately, it looks like under this new representation, there will no longer be the ability to control advanced styling (e.g. no ability to customize paragraph indentations on a document).


An update, for anyone interested. There exists an undocumented, and most likely unofficially supported, mark type indentation which somewhat works on (at least) Confluence Cloud (2020-09-21). An example definition is as follows:

"type": "paragraph",
"content": [], 
"marks": [{
    "type": "indentation",
    "attrs": {
        "level": 3

Inspecting the Atlaskit library v1 specification, a required level value is from 1-6 and this mark type only applies to the following type:

  • heading
  • paragraph

The mark type does not work in all situations. For example, if the paragraph is a child of a bulletList, the indentation value will be stripped (i.e. lists, as well as other types, cannot be indented).