Project

General

Profile

Actions

Feature #43095

open

Support automatic list marker insertion in textareas

Added by Mizuki ISHIKAWA about 11 hours ago. Updated about 9 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
UI
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

When editing a text using Markdown or Textile formatting, it's helpful to automatically insert the next list marker when pressing Enter after a list item.

This patch introduces a Stimulus controller that detects the current line and autofills the appropriate marker for both ordered and unordered lists, depending on the selected text formatting.

The behavior includes:
  • Autofilling the next bullet or number when pressing Enter
  • Removing the list marker when pressing Enter on an empty list item
  • Support for nested lists
  • Compatible with both Textile and CommonMark
  • Properly ignores Enter key during text composition with IME (e.g. Japanese input). this is implemented using compositionstart and compositionend events, which have been supported by all major browsers since 2015 and are stable to use.

It improves editing efficiency for users writing structured content.


Files

Actions

Also available in: Atom PDF