@mdaemon/html-editor-react 1.8.2 → 1.8.3
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 +18 -1
- package/package.json +87 -87
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.
|
|
16
|
+
engine uses — currently **3.31.3** (`@mdaemon/html-editor` `^1.12.3`,
|
|
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
|
|
@@ -498,6 +498,23 @@ tabs between block elements are collapsed per the usual HTML rules when the temp
|
|
|
498
498
|
inserted, so they do not become extra list items or blank blocks. Indentation inside a
|
|
499
499
|
`<pre>` or code block is preserved.
|
|
500
500
|
|
|
501
|
+
Stored templates are also tolerant of the wrappers and placeholders real-world HTML
|
|
502
|
+
carries:
|
|
503
|
+
|
|
504
|
+
- **Container `<div>`s do not become blank lines.** A body swaddled in several nested
|
|
505
|
+
`<div>`s (the shape mail clients and CMSes produce) is flattened on import rather than
|
|
506
|
+
leaving one empty line per wrapper.
|
|
507
|
+
- **A wrapper's font reaches the lines it wrapped.** `font-family`, `font-size`, `color`,
|
|
508
|
+
`line-height`, `text-align` and the other inherited properties on a container are
|
|
509
|
+
carried down to its children, so a body wrapped in
|
|
510
|
+
`<div style="font-family:Georgia;font-size:10pt">` keeps that font instead of falling
|
|
511
|
+
back to the editor default. A child that states its own value wins.
|
|
512
|
+
- **`<a href="">` survives.** A link whose target was left for later keeps its anchor
|
|
513
|
+
element instead of collapsing to plain text. Non-empty targets are still validated, so
|
|
514
|
+
`javascript:` and `data:` URLs are rejected as before.
|
|
515
|
+
|
|
516
|
+
`<blockquote>`, list items, table cells and the signature container keep their structure.
|
|
517
|
+
|
|
501
518
|
## Custom Toolbar Buttons
|
|
502
519
|
|
|
503
520
|
Register custom buttons via the `setup` callback in `config`:
|
package/package.json
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@mdaemon/html-editor-react",
|
|
3
|
-
"version": "1.8.
|
|
4
|
-
"description": "React wrapper for MDHTMLEditor",
|
|
5
|
-
"homepage": "https://github.com/mdaemon-technologies/MDHTMLEditor-react",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "https://github.com/mdaemon-technologies/MDHTMLEditor-react.git"
|
|
9
|
-
},
|
|
10
|
-
"bugs": {
|
|
11
|
-
"url": "https://github.com/mdaemon-technologies/MDHTMLEditor-react/issues"
|
|
12
|
-
},
|
|
13
|
-
"main": "dist/index.js",
|
|
14
|
-
"module": "dist/index.mjs",
|
|
15
|
-
"types": "dist/index.d.ts",
|
|
16
|
-
"exports": {
|
|
17
|
-
".": {
|
|
18
|
-
"types": "./dist/index.d.ts",
|
|
19
|
-
"import": "./dist/index.mjs",
|
|
20
|
-
"require": "./dist/index.js"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"publishConfig": {
|
|
24
|
-
"access": "public"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"dist"
|
|
28
|
-
],
|
|
29
|
-
"scripts": {
|
|
30
|
-
"build": "vite build --mode production",
|
|
31
|
-
"build:dev": "vite build --mode development",
|
|
32
|
-
"dev": "vite build --watch --mode development",
|
|
33
|
-
"demo": "vite serve --config vite.demo.config.ts",
|
|
34
|
-
"test": "jest",
|
|
35
|
-
"test:coverage": "jest --coverage",
|
|
36
|
-
"lint": "eslint src --ext .ts,.tsx",
|
|
37
|
-
"typecheck": "tsc --noEmit"
|
|
38
|
-
},
|
|
39
|
-
"keywords": [
|
|
40
|
-
"html-editor",
|
|
41
|
-
"wysiwyg",
|
|
42
|
-
"react",
|
|
43
|
-
"tiptap"
|
|
44
|
-
],
|
|
45
|
-
"author": {
|
|
46
|
-
"name": "MDaemon Technologies, Ltd.",
|
|
47
|
-
"email": "jonathan.ehman@mdaemon.com",
|
|
48
|
-
"url": "https://www.mdaemon.com"
|
|
49
|
-
},
|
|
50
|
-
"license": "LGPL-3.0-or-later",
|
|
51
|
-
"peerDependencies": {
|
|
52
|
-
"react": "^19.0.0 || ^18.0.0",
|
|
53
|
-
"react-dom": "^19.0.0 || ^18.0.0"
|
|
54
|
-
},
|
|
55
|
-
"dependencies": {
|
|
56
|
-
"@mdaemon/html-editor": "^1.12.
|
|
57
|
-
"@tiptap/react": "^3.31.3"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@eslint/js": "^9.39.4",
|
|
61
|
-
"@swc/core": "^1.11.0",
|
|
62
|
-
"@swc/jest": "^0.2.39",
|
|
63
|
-
"@testing-library/jest-dom": "^6.9.1",
|
|
64
|
-
"@testing-library/react": "^16.3.2",
|
|
65
|
-
"@types/jest": "^30.0.0",
|
|
66
|
-
"@types/react": "^19.2.0",
|
|
67
|
-
"@types/react-dom": "^19.2.0",
|
|
68
|
-
"@vitejs/plugin-react": "^6.0.2",
|
|
69
|
-
"eslint": "^9.39.4",
|
|
70
|
-
"eslint-plugin-react": "^7.37.5",
|
|
71
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
72
|
-
"globals": "^15.15.0",
|
|
73
|
-
"jest": "^30.3.0",
|
|
74
|
-
"jest-environment-jsdom": "^30.3.0",
|
|
75
|
-
"react": "^19.2.0",
|
|
76
|
-
"react-dom": "^19.2.0",
|
|
77
|
-
"typescript": "^6.0.2",
|
|
78
|
-
"typescript-eslint": "^8.61.0",
|
|
79
|
-
"vite": "^8.0.16",
|
|
80
|
-
"vite-plugin-dts": "^5.0.2"
|
|
81
|
-
},
|
|
82
|
-
"allowScripts": {
|
|
83
|
-
"@swc/core": true,
|
|
84
|
-
"esbuild": true,
|
|
85
|
-
"unrs-resolver": true
|
|
86
|
-
}
|
|
87
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@mdaemon/html-editor-react",
|
|
3
|
+
"version": "1.8.3",
|
|
4
|
+
"description": "React wrapper for MDHTMLEditor",
|
|
5
|
+
"homepage": "https://github.com/mdaemon-technologies/MDHTMLEditor-react",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/mdaemon-technologies/MDHTMLEditor-react.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/mdaemon-technologies/MDHTMLEditor-react/issues"
|
|
12
|
+
},
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"module": "dist/index.mjs",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.mjs",
|
|
20
|
+
"require": "./dist/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "vite build --mode production",
|
|
31
|
+
"build:dev": "vite build --mode development",
|
|
32
|
+
"dev": "vite build --watch --mode development",
|
|
33
|
+
"demo": "vite serve --config vite.demo.config.ts",
|
|
34
|
+
"test": "jest",
|
|
35
|
+
"test:coverage": "jest --coverage",
|
|
36
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
37
|
+
"typecheck": "tsc --noEmit"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"html-editor",
|
|
41
|
+
"wysiwyg",
|
|
42
|
+
"react",
|
|
43
|
+
"tiptap"
|
|
44
|
+
],
|
|
45
|
+
"author": {
|
|
46
|
+
"name": "MDaemon Technologies, Ltd.",
|
|
47
|
+
"email": "jonathan.ehman@mdaemon.com",
|
|
48
|
+
"url": "https://www.mdaemon.com"
|
|
49
|
+
},
|
|
50
|
+
"license": "LGPL-3.0-or-later",
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"react": "^19.0.0 || ^18.0.0",
|
|
53
|
+
"react-dom": "^19.0.0 || ^18.0.0"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@mdaemon/html-editor": "^1.12.3",
|
|
57
|
+
"@tiptap/react": "^3.31.3"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@eslint/js": "^9.39.4",
|
|
61
|
+
"@swc/core": "^1.11.0",
|
|
62
|
+
"@swc/jest": "^0.2.39",
|
|
63
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
64
|
+
"@testing-library/react": "^16.3.2",
|
|
65
|
+
"@types/jest": "^30.0.0",
|
|
66
|
+
"@types/react": "^19.2.0",
|
|
67
|
+
"@types/react-dom": "^19.2.0",
|
|
68
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
69
|
+
"eslint": "^9.39.4",
|
|
70
|
+
"eslint-plugin-react": "^7.37.5",
|
|
71
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
72
|
+
"globals": "^15.15.0",
|
|
73
|
+
"jest": "^30.3.0",
|
|
74
|
+
"jest-environment-jsdom": "^30.3.0",
|
|
75
|
+
"react": "^19.2.0",
|
|
76
|
+
"react-dom": "^19.2.0",
|
|
77
|
+
"typescript": "^6.0.2",
|
|
78
|
+
"typescript-eslint": "^8.61.0",
|
|
79
|
+
"vite": "^8.0.16",
|
|
80
|
+
"vite-plugin-dts": "^5.0.2"
|
|
81
|
+
},
|
|
82
|
+
"allowScripts": {
|
|
83
|
+
"@swc/core": true,
|
|
84
|
+
"esbuild": true,
|
|
85
|
+
"unrs-resolver": true
|
|
86
|
+
}
|
|
87
|
+
}
|