diff --git a/docs/specs/markdown-rendering.md b/docs/specs/markdown-rendering.md index 7ea8ea4c6..5df4b6f76 100644 --- a/docs/specs/markdown-rendering.md +++ b/docs/specs/markdown-rendering.md @@ -11,11 +11,12 @@ Markdown applies to the **`content` of text notes** in full, and to **list-note item text** in an inline-only subset (§2.1): - **Note titles are plain.** They are rendered as text everywhere. -- **List-item Markdown renders on display surfaces only.** Note cards, mobile's - read-only editor and the collapsed-completed parent label render it; the - editable row still shows its source, because it is an always-live input with no - preview mode. Closing that gap is - [#824](https://github.com/hanzei/jot/issues/824). +- **List-item Markdown renders everywhere on the webapp, and on display surfaces + on mobile.** Note cards, mobile's read-only editor and the collapsed-completed + parent label render it on both clients. The webapp's *editable* row renders it + too, swapping to source while it holds the caret (§1.2). Mobile's editable row + still shows source; closing that gap is + [#867](https://github.com/hanzei/jot/issues/867). ### 1.1 Note cards render links as text @@ -35,15 +36,96 @@ colour that only signals "link" fails anyone who cannot use it. So the label renders exactly as the surrounding text. The open note is unaffected: the webapp's modal preview and mobile's editor both -render live links, which is where a reader who wants the link already is. One -consequence worth naming: because the *editable* list-item row shows source -(above), a link typed into a list item now has no live surface on the webapp at -all until [#824](https://github.com/hanzei/jot/issues/824) gives that row a view -mode. Mobile still has one, in its read-only editor. +render live links, which is where a reader who wants the link already is. An +*editable* list-item row is the one other place a link stays inert, for a +different reason — §1.2. Both clients render the same feature set from the same source string, so a note written on a phone reads identically in a browser and the other way round. +### 1.2 The webapp's editable row swaps between rendered and source + +A list-item row on the webapp shows its Markdown rendered until it holds the +caret, and its source for exactly as long as it does. Type `**Milk**`, move +away, and the row reads **Milk**; click back into it and it reads `**Milk**` +again, with the caret where you clicked. + +**Focused and editing are the same state.** That is the decision the rest +follows from. Every keystroke a row handles — Tab to indent, Enter to split, +arrows to move between rows and through the completed-item suggestions — stays +on a real `