Contentful logo

Contentful Community

Nested lists in rich text fields

#1

My authors want to create indented lists for a privacy policy e.g.
1
a. (indented)
ii. (indented x 2)
I can’t for the life of me figure out how you might do this. Pasting in from a rtf that is formatted this way causes the editor to lock up (no error). It suggests that the authors can save but it doesn’t save anything.

The field does not reliably accept tabs and locks when trying to use them.

Does anyone know a work around that will not crash as you enter tabs?

0 Likes

#2

Hi Tricia,

This field type is structured with Markdown syntax, so it wouldn’t be possible to enable indentation as it is not possible through Markdown itself, as you can check in this relevant Stackoverflow thread:

Still, as mentioned, you could enable inline HTML as        to achieve the same appearance.

0 Likes

#3

You should be able to do sublists by starting each item of the sublist with four spaces ( https://commonmark.org/help/tutorial/10-nestedLists.html). You can handle the formatting of the sublist via CSS client side when the Markdown is parsed to HTML (assuming that is what you are doing).

The lists in the Contentful markdown editor will appear to be generic ordered or unordered lists but CSS can format them to desired list-style-type.

0 Likes