@mdaemon/html-editor-react 1.8.1 → 1.8.2

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.
Files changed (2) hide show
  1. package/README.md +7 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -13,7 +13,7 @@ npm install @mdaemon/html-editor-react @mdaemon/html-editor
13
13
  **Peer dependencies:** `react` and `react-dom` (v18 or v19).
14
14
 
15
15
  **TipTap:** the editor is built on TipTap 3, and this package tracks the same version the
16
- engine uses — currently **3.31.3** (`@mdaemon/html-editor` `^1.12.1`,
16
+ engine uses — currently **3.31.3** (`@mdaemon/html-editor` `^1.12.2`,
17
17
  `@tiptap/react` `^3.31.3`). If your app depends on any `@tiptap/*` package directly, keep
18
18
  it on that version too: ProseMirror throws at runtime if two copies of `@tiptap/core` /
19
19
  `@tiptap/pm` end up in the bundle. If you only use `<Editor>` or `useEditor`, there is
@@ -262,7 +262,7 @@ The `config` prop (or `useEditor`'s `config` option) accepts an `EditorConfig` o
262
262
  | `paste_from_office` | `boolean` | `true` | Clean and preserve formatting when pasting from Microsoft Word/Excel. Pasted list indentation is normalized either way &mdash; see [Lists & Indentation](#lists--indentation). |
263
263
  | `speech_to_text` | `boolean` | `true` | Enable the `speechtotext` and `dictate` toolbar buttons (requires the Web Speech API). |
264
264
  | `convert_unsafe_embeds` | `boolean` | `true` | Sanitize embedded content. |
265
- | `format_empty_lines` | `boolean` | `true` | Preserve blank lines outside the editor. On the way out (`getContent()`, the `onChange` payload, preview, and the source dialog) each empty block is filled with a `<br>` &mdash; bare empty blocks otherwise collapse to zero height in mail clients; on the way in (`setContent()`, `insertContent()`, templates) it is stripped back out, so `setContent(getContent(x))` is stable across round-trips. Set `false` to pass content through unchanged in both directions. |
265
+ | `format_empty_lines` | `boolean` | `true` | Preserve blank lines outside the editor. On the way out (`getContent()`, the `onChange` payload, preview, and the source dialog) each empty block is filled with a `<br>` &mdash; bare empty blocks otherwise collapse to zero height in mail clients; on the way in (`setContent()`, `insertContent()`, templates) it is stripped back out, so `setContent(getContent(x))` is stable across round-trips. A block is only "empty" if it has no visible content &mdash; a `<div>&nbsp;</div>` spacer counts as content and is left alone. Set `false` to pass content through unchanged in both directions. |
266
266
  | `includeTemplates` | `boolean` | `false` | Show the template dropdown. |
267
267
  | `templates` | `Template[]` | `[]` | Predefined HTML templates. |
268
268
  | `dropbox` | `boolean` | `false` | Enable Dropbox integration. |
@@ -493,6 +493,11 @@ interface Template {
493
493
  }
494
494
  ```
495
495
 
496
+ `content` may be pretty-printed &mdash; indented, one block per line. The newlines and
497
+ tabs between block elements are collapsed per the usual HTML rules when the template is
498
+ inserted, so they do not become extra list items or blank blocks. Indentation inside a
499
+ `<pre>` or code block is preserved.
500
+
496
501
  ## Custom Toolbar Buttons
497
502
 
498
503
  Register custom buttons via the `setup` callback in `config`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdaemon/html-editor-react",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "React wrapper for MDHTMLEditor",
5
5
  "homepage": "https://github.com/mdaemon-technologies/MDHTMLEditor-react",
6
6
  "repository": {
@@ -53,7 +53,7 @@
53
53
  "react-dom": "^19.0.0 || ^18.0.0"
54
54
  },
55
55
  "dependencies": {
56
- "@mdaemon/html-editor": "^1.12.1",
56
+ "@mdaemon/html-editor": "^1.12.2",
57
57
  "@tiptap/react": "^3.31.3"
58
58
  },
59
59
  "devDependencies": {