Numbered List Not Working in Editor
Current Behavior
Numbered list does not work when adding replies or creating new discussions.
Current Result: Numbered list does not add more than "1." when creating lists. Steps to Reproduce
Steps to Reproduce
- Go to the forum
- Log in to your account
- Enter any discussion or start a new one
- Click the numbered list icon in the editor toolbar
- Try to create multiple numbered items by pressing Enter
Expected Behavior
After pressing the Enter button, consecutive numbers should be added to the numbered list (1., 2., 3., etc.).
Screenshots
https://github.com/user-attachments/assets/aa0e144e-e485-4d67-8d0a-b8139603e9e9
Environment
- Flarum version: 1.8.7
- PHP version: 8.3.21
- Browser: Chrome - version 138.0.7204.184; Firefox - version 141.0
I looked into this. The root cause is that the Markdown editor has no list continuation at all: pressing Enter just inserts a plain newline. The toolbar's "ordered list" button only ever prefixes the current line, and it always starts at 1., so the only way to add items is to re-click the button — which keeps producing 1.. That's why a numbered list never gets past 1..
I've opened #4778, which makes Enter inside a list item continue the list: ordered lists increment (1. → 2. → 3.), unordered lists repeat the bullet, and pressing Enter on an empty item ends the list — the behaviour you'd expect from most Markdown editors.
Note this is the plain Markdown editor; if you have the FoF Rich Text extension enabled, it uses its own editor that already handles this.