Improve support for ordered and unordered lists
Context
This issue is duplicated in the Ketida repo https://gitlab.coko.foundation/ketida/ketida/-/issues/574
Currently these are the only two buttons relevant to lists in the Wax editor:
Currently you can create a very basic nested list in the editor by following these steps:
- Click the list icon (ordered or unordered) which creates the first item
- Type some text into the first item
- Hit enter to get a second item
- Click the list icon again, to nest the second list item
The problem is, for ordered lists, the resulting list is like this, and the PagedJS templates export this as WYSIWYG where the numbering is the same as in the editor shown below.
- an issue for ordered lists is that if a paragraph or teacher refers to point 1, there are multiple point 1s so it doesn't make sense.
- another issue is that for ordered and unordered lists is that you can't subsequently create points in the unnested part of the list (in the example above there is no intuitive way to unnest point 3 to make it a continuation of the previous level of the list). The workaround for this in the editor is to create the full unnested list (1, 2, 3), then add nested points within it by hitting enter on the 'parent' item and clicking the list icon again to nest children (nested items) within it, but that's not intuitive in the authoring process because it requires you to create all the 'parent' items first instead of writing the list top to bottom.
- another issue for ordered lists is the lack of support for roman numerals, alphabetical lists, and other similar list handling which appears in a lot of textbooks.
- Lastly, it's impossible to continue numbering when the list is split by explanatory paragraphs that are not part of the list.
Proposal
Add advanced list handling:
-
Dropdown list for types of bullets in unordered lists -
Dropdown list for types of 'numbers' in ordered lists (like roman numerals; A, B, C etc.) -
Add 'Continue numbering' and 'Restart numbering' options -
Add an ident and unindent button that allows you to shift part of the list right (to be nested) and left (to get unnested)
To give further context to how this is handled by other editors (not intended to be copied, rather just for context because it's a common feature in WYSIWYG editors), for example MS Word and Google Docs handle advanced lists like this:
Design
[Include sketch or wireframes of the UI changes necessary for this feature]
Implementation (if applicable)
[A description of the steps to implement the feature.]
Alternative approaches (if applicable)
[Include any alternatives to meet this use case.]
Open issues (if applicable)
[Links to and a discussion of related issues, if applicable.]