@opositatest/markdown-text-editor 1.4.1 → 1.4.4
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 +34 -1
- package/dist/editor.js +10147 -10101
- package/dist/react/index.js +1865 -1819
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,7 +49,40 @@ The only exceptions are BlockNote's own behaviours *inside* a block:
|
|
|
49
49
|
indenting the table.
|
|
50
50
|
|
|
51
51
|
Markdown that already contains nested lists (pasted content or a document saved before this rule) is still
|
|
52
|
-
parsed and re-exported
|
|
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.
|
|
54
|
+
|
|
55
|
+
### Numbered apartados and literal numbers
|
|
56
|
+
|
|
57
|
+
A number you type is **never** turned into an automatic list, so the number you wrote is the number that is
|
|
58
|
+
saved. Typing `1. `, `2. `, `3.ª`… at the start of a line just writes that text, exactly like the BOE does, and
|
|
59
|
+
apartados that are cited elsewhere by number are never renumbered:
|
|
60
|
+
|
|
61
|
+
- `1. No será preciso…` and `3. Tampoco será preciso…` stay two lines of text, aligned the same way, even when
|
|
62
|
+
the second one skips a number.
|
|
63
|
+
- Markdown cannot express "1, 3": inside a list only the first item's number is kept and the editor paints every
|
|
64
|
+
other number from the item's position, which is why an automatic list cannot hold a number you wrote.
|
|
65
|
+
|
|
66
|
+
This is also why paragraph text that starts with a block marker is escaped when the document is saved
|
|
67
|
+
(`3. No será preciso` is stored as `3\. No será preciso`). Without the escape, that line would come back as a
|
|
68
|
+
numbered list item, so the number would stop being text and start being renumbered. The escape renders exactly
|
|
69
|
+
the same in any Markdown renderer.
|
|
70
|
+
|
|
71
|
+
To create an actual numbered list, use the slash menu (`/lista numerada`), the block type selector or
|
|
72
|
+
`Ctrl/⌘+Shift+7`; it keeps its own positional numbering, and Markdown documents that already contain lists are
|
|
73
|
+
loaded as lists.
|
|
74
|
+
|
|
75
|
+
### Pasting
|
|
76
|
+
|
|
77
|
+
Pasted content is taken at face value: the `text/html` flavour when the source provides it, plain text otherwise.
|
|
78
|
+
It is never *guessed* to be Markdown, because the plain text of a legal document is full of lines starting with
|
|
79
|
+
`1. `, and parsing it as Markdown turned the apartados into an automatic list that then renumbered them (`1.`,
|
|
80
|
+
`3.` came back as `1.`, `2.`).
|
|
81
|
+
|
|
82
|
+
- `Ctrl/⌘+V` from a web page keeps the HTML structure — headings, bold, links — with the numbers as text.
|
|
83
|
+
- `Ctrl/⌘+Shift+V` (paste without formatting) inserts the text literally, which is what the **Quitar formato**
|
|
84
|
+
button suggests when the source formatting is not wanted.
|
|
85
|
+
- Explicit Markdown still works: `text/markdown` on the clipboard, and the editor's own `pasteMarkdown()`.
|
|
53
86
|
|
|
54
87
|
### Math / LaTeX blocks
|
|
55
88
|
|