@mdxeditor/editor 2.19.0 → 2.20.1
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.
|
@@ -50,7 +50,7 @@ const ImageDialog = () => {
|
|
|
50
50
|
},
|
|
51
51
|
className: styles.multiFieldForm
|
|
52
52
|
},
|
|
53
|
-
/* @__PURE__ */ React__default.createElement("div", { className: styles.formField }, /* @__PURE__ */ React__default.createElement("label", { htmlFor: "file" }, t("uploadImage.uploadInstructions", "Upload an image from your device:")), /* @__PURE__ */ React__default.createElement("input", { type: "file", ...register("file") })),
|
|
53
|
+
/* @__PURE__ */ React__default.createElement("div", { className: styles.formField }, /* @__PURE__ */ React__default.createElement("label", { htmlFor: "file" }, t("uploadImage.uploadInstructions", "Upload an image from your device:")), /* @__PURE__ */ React__default.createElement("input", { type: "file", accept: "image/*", ...register("file") })),
|
|
54
54
|
/* @__PURE__ */ React__default.createElement("div", { className: styles.formField }, /* @__PURE__ */ React__default.createElement("label", { htmlFor: "src" }, t("uploadImage.addViaUrlInstructions", "Or add an image from an URL:")), /* @__PURE__ */ React__default.createElement(
|
|
55
55
|
DownshiftAutoComplete,
|
|
56
56
|
{
|
|
@@ -80,9 +80,10 @@ const linkDialogState$ = Cell({ type: "inactive" }, (r) => {
|
|
|
80
80
|
linkDialogState$
|
|
81
81
|
);
|
|
82
82
|
r.sub(r.pipe(updateLink$, withLatestFrom(activeEditor$, linkDialogState$, currentSelection$)), ([payload, editor, state, selection]) => {
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
|
|
83
|
+
var _a, _b;
|
|
84
|
+
const url = ((_a = payload.url) == null ? void 0 : _a.trim()) ?? "";
|
|
85
|
+
const title = ((_b = payload.title) == null ? void 0 : _b.trim()) ?? "";
|
|
86
|
+
if (url !== "") {
|
|
86
87
|
if (selection == null ? void 0 : selection.isCollapsed()) {
|
|
87
88
|
const linkContent = title || url;
|
|
88
89
|
editor == null ? void 0 : editor.update(
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"*.css"
|
|
12
12
|
],
|
|
13
13
|
"type": "module",
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.20.1",
|
|
15
15
|
"description": "React component for rich text markdown editing",
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "vite build",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"lint": "eslint src --ext .ts,.tsx",
|
|
23
23
|
"test": "vitest",
|
|
24
24
|
"semantic-release": "semantic-release",
|
|
25
|
-
"image-upload-backend": "node ./src/
|
|
25
|
+
"image-upload-backend": "node ./src/examples/file-backend.js"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"dist"
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@codemirror/state": "^6.4.0",
|
|
42
42
|
"@codemirror/view": "^6.23.0",
|
|
43
43
|
"@codesandbox/sandpack-react": "^2.10.0",
|
|
44
|
-
"@lexical/clipboard": "^0.14.
|
|
45
|
-
"@lexical/link": "^0.14.
|
|
46
|
-
"@lexical/list": "^0.14.
|
|
47
|
-
"@lexical/markdown": "^0.14.
|
|
48
|
-
"@lexical/plain-text": "^0.14.
|
|
49
|
-
"@lexical/react": "^0.14.
|
|
50
|
-
"@lexical/rich-text": "^0.14.
|
|
51
|
-
"@lexical/selection": "^0.14.
|
|
52
|
-
"@lexical/utils": "^0.14.
|
|
44
|
+
"@lexical/clipboard": "^0.14.3",
|
|
45
|
+
"@lexical/link": "^0.14.3",
|
|
46
|
+
"@lexical/list": "^0.14.3",
|
|
47
|
+
"@lexical/markdown": "^0.14.3",
|
|
48
|
+
"@lexical/plain-text": "^0.14.3",
|
|
49
|
+
"@lexical/react": "^0.14.3",
|
|
50
|
+
"@lexical/rich-text": "^0.14.3",
|
|
51
|
+
"@lexical/selection": "^0.14.3",
|
|
52
|
+
"@lexical/utils": "^0.14.3",
|
|
53
53
|
"@mdxeditor/gurx": "^1.1.1",
|
|
54
54
|
"@radix-ui/colors": "^3.0.0",
|
|
55
55
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"codemirror": "^6.0.1",
|
|
65
65
|
"downshift": "^7.6.0",
|
|
66
66
|
"js-yaml": "4.1.0",
|
|
67
|
-
"lexical": "^0.14.
|
|
67
|
+
"lexical": "^0.14.3",
|
|
68
68
|
"mdast-util-directive": "^3.0.0",
|
|
69
69
|
"mdast-util-from-markdown": "^2.0.0",
|
|
70
70
|
"mdast-util-frontmatter": "^2.0.1",
|