Bullets/Lists inside of a Table

Before I invest too much time, is it possible to render a bullet list within a table cell? I know we can iterate over an simple array with a list of simple objects like [{"key": "Value"}], but when happens when we have a nested array in the value.

I tried a few different setups, one attempt was joining the array items into a string separated by commas and inserting <li> tags from my front-end, but it seems the formatting doesn’t work with inline HTML styles—I just end up seeing the raw <li> tags.

Is there a way to achieve this?

test.docx (19.5 KB)

{
	"example": [
		{
			"title": "Silo: Fire",
			"bullets": ["bullet 1", "bullet 2", "bullet 3"]
		},
		{
			"title": "Silo: Wool",
			"bullets": ["bullet 4", "bullet 5", "bullet 6"]
		}
	]
}

Hello @pointmanbx,

You can insert a bullet list into a table cell using the HTML formatter with the MixStyle option:

{{text}:html(MixStyle)}

This is the example:

  1. Docx template

  1. JSON
{
    "text": "<html><head><title></title></head><body><ul style=\"color: green; font-size: 20px\"><li>Coffee</li><li>Tea</li><li>Milk</li></ul></body></html>"
}
  1. Result:

Please give it a try.

Best regards,
Petr
Plumsail team

I tried that last night, but it didn’t work :joy: . This morning, I started fresh, experimented a bit, and finally got it working. Here’s the file for reference—thanks for the quick assist!

test (2).docx (19.8 KB)

1 Like