Socket
Socket
Sign inDemoInstall

@mdxeditor/editor

Package Overview
Dependencies
Maintainers
1
Versions
189
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 0.22.3 to 0.22.4

10

dist/MDXEditor.js

@@ -11,3 +11,3 @@ import React__default from "react";

import { noop } from "./utils/fp.js";
import { RealmPluginInitializer } from "./gurx/react.js";
import { RealmPluginInitializer, useHasPlugin } from "./gurx/react.js";
const LexicalProvider = ({ children }) => {

@@ -83,2 +83,3 @@ const [initialRootEditorState, nodes, readOnly] = corePluginHooks.useEmitterValues(

const realm = corePluginHooks.useRealmContext();
const hasDiffSourcePlugin = useHasPlugin("diff-source");
React__default.useImperativeHandle(

@@ -89,2 +90,7 @@ mdxRef,

getMarkdown: () => {
if (hasDiffSourcePlugin) {
if (realm.getKeyValue("viewMode") === "source") {
return realm.getKeyValue("markdownSourceEditorValue");
}
}
return realm.getKeyValue("markdown");

@@ -101,3 +107,3 @@ },

},
[realm]
[realm, hasDiffSourcePlugin]
);

@@ -104,0 +110,0 @@ return null;

4

dist/plugins/diff-source/index.d.ts

@@ -299,3 +299,3 @@ import type { RefObject, ReactNode, ComponentType } from 'react';

}>;
useEmitter: <K extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "viewMode" | "diffMarkdown" | "markdownSourceEditorValue">(key: K, callback: (value: ValueForKey<{
useEmitter: <K extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "markdownSourceEditorValue" | "viewMode" | "diffMarkdown">(key: K, callback: (value: ValueForKey<{
viewMode: RealmNode<ViewMode>;

@@ -527,3 +527,3 @@ diffMarkdown: RealmNode<string>;

}>) => void;
usePublisher: <K_2 extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "viewMode" | "diffMarkdown" | "markdownSourceEditorValue">(key: K_2) => (value: ValueForKey<{
usePublisher: <K_2 extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "markdownSourceEditorValue" | "viewMode" | "diffMarkdown">(key: K_2) => (value: ValueForKey<{
viewMode: RealmNode<ViewMode>;

@@ -530,0 +530,0 @@ diffMarkdown: RealmNode<string>;

@@ -12,3 +12,3 @@ {

"type": "module",
"version": "0.22.3",
"version": "0.22.4",
"description": "React component for rich text markdown editing",

@@ -15,0 +15,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