Socket
Socket
Sign inDemoInstall

@mdxeditor/editor

Package Overview
Dependencies
Maintainers
1
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mdxeditor/editor - npm Package Compare versions

Comparing version 3.9.0 to 3.9.1

11

dist/plugins/image/ImageDialog.js

@@ -7,10 +7,11 @@ import * as Dialog from "@radix-ui/react-dialog";

import { editorRootElementRef$, useTranslation } from "../core/index.js";
import { imageAutocompleteSuggestions$, imageDialogState$, saveImage$, closeImageDialog$ } from "./index.js";
import { imageAutocompleteSuggestions$, imageDialogState$, imageUploadHandler$, saveImage$, closeImageDialog$ } from "./index.js";
import { DownshiftAutoComplete } from "../core/ui/DownshiftAutoComplete.js";
import { useCellValues, usePublisher } from "@mdxeditor/gurx";
const ImageDialog = () => {
const [imageAutocompleteSuggestions, state, editorRootElementRef] = useCellValues(
const [imageAutocompleteSuggestions, state, editorRootElementRef, imageUploadHandler] = useCellValues(
imageAutocompleteSuggestions$,
imageDialogState$,
editorRootElementRef$
editorRootElementRef$,
imageUploadHandler$
);

@@ -54,4 +55,4 @@ const saveImage = usePublisher(saveImage$);

},
/* @__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") })),
/* @__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(
imageUploadHandler !== null && /* @__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") })),
/* @__PURE__ */ React__default.createElement("div", { className: styles.formField }, /* @__PURE__ */ React__default.createElement("label", { htmlFor: "src" }, imageUploadHandler !== null ? t("uploadImage.addViaUrlInstructions", "Or add an image from an URL:") : t("uploadImage.addViaUrlInstructionsNoUpload", "Add an image from an URL:")), /* @__PURE__ */ React__default.createElement(
DownshiftAutoComplete,

@@ -58,0 +59,0 @@ {

@@ -86,2 +86,5 @@ import { $wrapNodeInElement, mergeRegister } from "@lexical/utils";

(event) => {
if (!theUploadHandler) {
return false;
}
return onDragStart(event);

@@ -88,0 +91,0 @@ },

@@ -14,3 +14,3 @@ {

"type": "module",
"version": "3.9.0",
"version": "3.9.1",
"description": "React component for rich text markdown editing",

@@ -17,0 +17,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc