@mdxeditor/editor
Advanced tools
Comparing version 2.13.2 to 2.14.0
@@ -12,3 +12,3 @@ import "./styles/globals.css.js"; | ||
import { disableAutoLink$, linkPlugin } from "./plugins/link/index.js"; | ||
import { INSERT_IMAGE_COMMAND, closeImageDialog$, disableImageResize$, imageAutocompleteSuggestions$, imageDialogState$, imagePlugin, imagePreviewHandler$, imageUploadHandler$, insertImage$, openEditImageDialog$, openNewImageDialog$, saveImage$ } from "./plugins/image/index.js"; | ||
import { INSERT_IMAGE_COMMAND, closeImageDialog$, disableImageResize$, disableImageSettingsButton$, imageAutocompleteSuggestions$, imageDialogState$, imagePlugin, imagePreviewHandler$, imageUploadHandler$, insertImage$, openEditImageDialog$, openNewImageDialog$, saveImage$ } from "./plugins/image/index.js"; | ||
import { frontmatterDialogOpen$, frontmatterPlugin, hasFrontmatter$, insertFrontmatter$, removeFrontmatter$ } from "./plugins/frontmatter/index.js"; | ||
@@ -192,2 +192,3 @@ import { quotePlugin } from "./plugins/quote/index.js"; | ||
disableImageResize$, | ||
disableImageSettingsButton$, | ||
editorInFocus$, | ||
@@ -194,0 +195,0 @@ editorRootElementRef$, |
@@ -7,3 +7,3 @@ import React__default from "react"; | ||
import { $isNodeSelection, $getSelection, $getNodeByKey, $setSelection, SELECTION_CHANGE_COMMAND, COMMAND_PRIORITY_LOW, CLICK_COMMAND, DRAGSTART_COMMAND, KEY_DELETE_COMMAND, KEY_BACKSPACE_COMMAND, KEY_ENTER_COMMAND, KEY_ESCAPE_COMMAND } from "lexical"; | ||
import { disableImageResize$, imagePreviewHandler$, openEditImageDialog$ } from "./index.js"; | ||
import { disableImageResize$, disableImageSettingsButton$, imagePreviewHandler$, openEditImageDialog$ } from "./index.js"; | ||
import styles from "../../styles/ui.module.css.js"; | ||
@@ -52,4 +52,5 @@ import { iconComponentFor$, readOnly$, useTranslation } from "../core/index.js"; | ||
function ImageEditor({ src, title, alt, nodeKey, width, height }) { | ||
const [disableImageResize, imagePreviewHandler, iconComponentFor, readOnly] = useCellValues( | ||
const [disableImageResize, disableImageSettingsButton, imagePreviewHandler, iconComponentFor, readOnly] = useCellValues( | ||
disableImageResize$, | ||
disableImageSettingsButton$, | ||
imagePreviewHandler$, | ||
@@ -215,3 +216,3 @@ iconComponentFor$, | ||
} | ||
)), draggable && isFocused && !disableImageResize && /* @__PURE__ */ React__default.createElement(ImageResizer, { editor, imageRef, onResizeStart, onResizeEnd }), /* @__PURE__ */ React__default.createElement( | ||
)), draggable && isFocused && !disableImageResize && /* @__PURE__ */ React__default.createElement(ImageResizer, { editor, imageRef, onResizeStart, onResizeEnd }), !disableImageSettingsButton && /* @__PURE__ */ React__default.createElement( | ||
"button", | ||
@@ -218,0 +219,0 @@ { |
@@ -131,2 +131,3 @@ import { $wrapNodeInElement, mergeRegister } from "@lexical/utils"; | ||
}); | ||
const disableImageSettingsButton$ = Cell(false); | ||
const saveImage$ = Signal(); | ||
@@ -143,2 +144,3 @@ const imagePlugin = realmPlugin({ | ||
[disableImageResize$]: Boolean(params == null ? void 0 : params.disableImageResize), | ||
[disableImageSettingsButton$]: Boolean(params == null ? void 0 : params.disableImageSettingsButton), | ||
[imagePreviewHandler$]: (params == null ? void 0 : params.imagePreviewHandler) || null | ||
@@ -291,2 +293,3 @@ }); | ||
disableImageResize$, | ||
disableImageSettingsButton$, | ||
imageAutocompleteSuggestions$, | ||
@@ -293,0 +296,0 @@ imageDialogState$, |
@@ -14,3 +14,3 @@ { | ||
"type": "module", | ||
"version": "2.13.2", | ||
"version": "2.14.0", | ||
"description": "React component for rich text markdown editing", | ||
@@ -17,0 +17,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
510875
13344