A checklist could previously only be edited one item at a time through its
per-item HTML row - reordering, copying between checklists/cards, or a bulk
rewording meant a click-drag or a click-edit-save per item. WeKan already
had "one line = one new item" for ADDING items (the newline-becomes-item
toggle), but nothing let a user rewrite the items an existing checklist
already has as one text block.
Adds "Edit as text" to a checklist's actions menu (alongside Export/Import,
Delete, Move, Copy). It opens a textarea pre-filled with the checklist's
current items, one per line, using the Markdown-checklist convention
`[x] Done item` / `[ ] Todo item` for checked state (a plain line with no
marker defaults to unchecked, so text pasted from elsewhere still works).
Saving replaces the item list with what was typed, in that order.
The parsing and the replace-plan are pure functions
(models/lib/checklistItemsAsText.js): checklistItemsToText/
parseChecklistItemsText convert between the textarea's text and
{title, isFinished} objects, and planChecklistItemsTextUpdate matches each
parsed line against the checklist's current items by unchanged title text
(consumed top-to-bottom, so reordered duplicates still pair 1:1) - a match
KEEPS that item's existing document (only sort/isFinished change), so any
other metadata on it, notably the #4755 due date, survives an edit that
doesn't touch its text. Only a line whose title has no remaining match
becomes a new item, and only an existing item whose text is gone from the
new text is removed.
Thanks to gerroon and xet7 !
Closes#4218,