@mdxeditor/editor
Advanced tools
Comparing version 2.20.5 to 2.20.6
@@ -7,3 +7,3 @@ import { realmPlugin } from "../../RealmWithPlugins.js"; | ||
import { Cell, withLatestFrom, Signal, filter, map, useCellValue, scan } from "@mdxeditor/gurx"; | ||
import { createCommand, FORMAT_TEXT_COMMAND, $isRootOrShadowRoot, $getRoot, $setSelection, $getSelection, $insertNodes, SELECTION_CHANGE_COMMAND, COMMAND_PRIORITY_CRITICAL, FOCUS_COMMAND, KEY_DOWN_COMMAND, $isDecoratorNode, BLUR_COMMAND, $isRangeSelection, $createParagraphNode, ParagraphNode, TextNode, createEditor } from "lexical"; | ||
import { createCommand, FORMAT_TEXT_COMMAND, $isRootOrShadowRoot, $getRoot, $setSelection, $getSelection, $insertNodes, SELECTION_CHANGE_COMMAND, COMMAND_PRIORITY_CRITICAL, DecoratorNode, $createParagraphNode, FOCUS_COMMAND, KEY_DOWN_COMMAND, $isDecoratorNode, BLUR_COMMAND, $isRangeSelection, ParagraphNode, TextNode, createEditor } from "lexical"; | ||
import { mdxJsxFromMarkdown, mdxJsxToMarkdown } from "mdast-util-mdx-jsx"; | ||
@@ -255,2 +255,11 @@ import { mdxJsx } from "micromark-extension-mdx-jsx"; | ||
editorState.read(() => { | ||
const lastChild = $getRoot().getLastChild(); | ||
if (lastChild instanceof DecoratorNode) { | ||
rootEditor.update( | ||
() => { | ||
$getRoot().append($createParagraphNode()); | ||
}, | ||
{ discrete: true } | ||
); | ||
} | ||
theNewMarkdownValue = exportMarkdownFromLexical({ | ||
@@ -257,0 +266,0 @@ root: $getRoot(), |
@@ -14,3 +14,3 @@ { | ||
"type": "module", | ||
"version": "2.20.5", | ||
"version": "2.20.6", | ||
"description": "React component for rich text markdown editing", | ||
@@ -17,0 +17,0 @@ "scripts": { |
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
512774
13380