Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains how to control set a JSON table's column width using the app, the Advanced Tables for Confluence app.

Instructions

  1. Log into your Confluence instance, and create
    1. If you already have a page with the JSON macro then please go to Step # 4. 
    2. Create a new page or click Image Modifiedto edit an existing page.

  2. Insert the Advanced Table - JSON Table macro. For this example, consider the URL of JSON data:
    Image Removed
    Image Added

  3. Edit the macro and navigate to JSON settings > Data source, Data format, Data settings and enter the below details as shown:
    Image Removed
    Image Removed
    Image Removed

    Image Added

    The following screenshot shows the different fields which we have selected for this example. 
    Image Added
    Image Added

  4. Go to Column Settings > Formatting > Cog wheel (Show column attributes as shown:
    Image Removed
    Image Added
  5. Enter style="width:170px;" under Column attributes, and click Save settings

    NoteAs the sample table contains a single column, the style is provided for the first column (in the screenshot, refer to Columns with number 1).

    (You can replace 170 px with your requirement). 
     

    1. Use Add formatting to specify formatting for other columns in your table. 

    2. Here we are adding the different column attributes for the columns with different pixel size.  Use this style for the columns as per your requirement in your table(s).

    Tip

    Use Add formatting to specify formatting for other columns in your table.

    Image Removed

    1. Image Added


  6. The output displays the required table column width. For the given example, the table is displayed as:


    Image RemovedImage Added

    Info
    • We recommend this to be tested in a non-production environment
    first
    • before implementing in production.