mdwysiwyg 0.2.1 → 0.4.0

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
@@ -117,11 +117,16 @@ Try it in your browser, no install required: **[ferkiernan.github.io/mdwysiwyg](
117
117
  | Insert | Images (by URL), links (URL-only dialog when text is already selected, auto `http://` prefix), tables (visual size picker), horizontal rules, embedded HTML |
118
118
  | Links | Click an existing link to open a quick popover: go to URL, copy URL, or edit/remove it inline |
119
119
  | Tables | Click an already-focused cell again for a context menu: add/move/delete columns (header cells) or rows (data cells) |
120
+ | Cursor between blocks | Click the free area to the right of a table (or the gap between two blocks) to put the cursor there; press Enter to add a blank line, or just type. When the document ends in a block (table, code, Mermaid, quote, list, rule, image) an empty line always follows it |
120
121
  | Code | Fenced code blocks with a language picker (JSON/SQL/TypeScript/JavaScript/Java/custom) and syntax highlighting |
121
122
  | Diagrams | ` ```mermaid ` blocks render as live diagrams; pasted Mermaid syntax is auto-detected on HTML insert. Lazy-loaded, `securityLevel: strict` |
122
123
  | Export | Copy as Markdown or as HTML, one click |
123
124
  | Modes | Full editor (default) or read-only viewer (`onlyView`, with a configurable notice via `onlyViewNotice`) |
124
125
  | Sizing | Fixed (`width`/`height` props) or user-resizable (`resizable`, default on) |
126
+ | Toolbar | Shown by default; hide/show it at runtime with `showToolbar` (no content, caret or undo loss) |
127
+ | Version history | Opt-in `historyUndo`: a version is saved after 3 s without changes; a clock icon right after the HTML button opens a history mode with ← Undo / Redo →, Confirm / Cancel (back to last version) and a right-hand list of versions with their time (click one to jump to it; document read-only while browsing; `Ctrl+Z` / `Ctrl+Shift+Z` map to Undo / Redo) |
128
+ | Compare mode | `mode="compare"` + `compareOrientation` (`side-to-side` / `up-and-down`) + `compareContent`: read-only original next to an editable new version with changed words highlighted in yellow, and a second bar to accept, reject or restore the change (`onCompareDecision`) |
129
+ | Compare scroll sync | In compare mode the two panes follow each other by matching content (top edge ↔ top edge; added/removed passages are crossed proportionally; vertical only). On by default; turn it off with `compareSyncScroll={false}` |
125
130
  | Theming | CSS Custom Properties for toolbar colors/gradient/font, per-view content color & font, table header, code block & Mermaid-diagram-area backgrounds, scrollbar colors (including the toolbar's own auto-scroll), and content-area background (solid color, gradient, or image) |
126
131
  | Imperative API | `ref` exposing `reset()` and `isModified()` for discard-changes / unsaved-warning flows |
127
132