@opositatest/markdown-text-editor 1.4.4 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -34,23 +34,37 @@ The editor currently focuses on text-first rich content that serializes cleanly
34
34
  - Inline styles: bold, italic, underline, strikethrough, and inline code
35
35
  - Display math blocks written in LaTeX
36
36
 
37
- Indented / nested blocks are **not** part of the supported surface: `Tab` never indents (see [Tab key](#tab-key)).
37
+ Indented / nested blocks are **not** part of the supported surface, with one exception: a list item nested under
38
+ another list item is a nested list in Markdown, so `Tab` creates it (see [Tab key](#tab-key)). The formatting
39
+ toolbar still offers no *Anidar bloque* / *Desanidar bloque* action.
38
40
 
39
41
  ### Tab key
40
42
 
41
43
  `Tab` behaves like it does in any other form control: it moves focus to the next focusable element of the
42
- host page (`Shift-Tab` moves to the previous one), so it never indents a block or uses the browser's focus as a
43
- trap. `Escape` still blurs the editor.
44
+ host page (`Shift-Tab` moves to the previous one), so a paragraph, a heading or a quote never indents, and the
45
+ editor never uses the browser's focus as a trap. `Escape` still blurs the editor.
44
46
 
45
- The only exceptions are BlockNote's own behaviours *inside* a block:
47
+ The exceptions are BlockNote's own behaviours *inside* a block:
46
48
 
49
+ - **Lists** (bullet, numbered, checklist, toggle): `Tab` on the second and later items nests the item under the
50
+ previous one, and `Shift-Tab` lifts a nested item back out. A nested list is the one kind of indentation
51
+ Markdown can express, so it round-trips as `* parent` / ` * child`. The **first** item of a list cannot nest
52
+ (there is nothing above it to nest into), so `Tab` there leaves the editor - there is always a way out of the
53
+ field with the keyboard.
47
54
  - **Code blocks**: `Tab` inserts two spaces. `Shift-Tab` leaves the editor.
48
55
  - **Tables**: `Tab` / `Shift-Tab` move between cells. At the first/last cell they leave the editor instead of
49
56
  indenting the table.
50
57
 
51
- Markdown that already contains nested lists (pasted content or a document saved before this rule) is still
52
- parsed and re-exported, but indentation can no longer be created from the keyboard, and a paragraph nested under
53
- a list item is currently flattened out of it when the document is saved again.
58
+ The nest/un-nest buttons BlockNote ships in the formatting toolbar are filtered out (`EXCLUDED_ITEM_KEYS` in
59
+ `src/components/app-block-note-view/app-formatting-toolbar.tsx`, pinned by `app-formatting-toolbar.test.tsx`):
60
+ they indent whatever block is selected - a paragraph, a list under a paragraph, a paragraph under a list item -
61
+ and Markdown reads all of those lines back as *siblings*, so the nesting the user saw would disappear on the
62
+ next save. Only `Tab` inside a list nests, and only when the result is still a list. That filter matches on the
63
+ upstream item `key` (`nestBlockButton` / `unnestBlockButton`), so an upstream rename would silently bring the
64
+ buttons back rather than fail loudly.
65
+
66
+ Markdown that already contains nested lists is parsed and re-exported unchanged, and a paragraph nested under a
67
+ list item is currently flattened out of it when the document is saved again.
54
68
 
55
69
  ### Numbered apartados and literal numbers
56
70
 
@@ -154,6 +168,8 @@ Selecting text opens the formatting toolbar. Its **Quitar formato** action conve
154
168
  text blocks to paragraphs and removes inline styles, colors, code formatting, and links in one
155
169
  undoable operation. Non-text blocks such as images, tables, and formulas are left unchanged.
156
170
 
171
+ The toolbar never offers nesting/un-nesting (see [Tab key](#tab-key)); text alignment is still available.
172
+
157
173
  The action tooltip also shows the browser shortcut for pasting without source formatting:
158
174
  `Ctrl/⌘ + Shift + V`.
159
175