@mdxeditor/editor 3.21.4 → 3.21.5
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.
package/dist/index.d.ts
CHANGED
|
@@ -2073,7 +2073,7 @@ export declare interface MDXEditorProps {
|
|
|
2073
2073
|
*/
|
|
2074
2074
|
contentEditableClassName?: string;
|
|
2075
2075
|
/**
|
|
2076
|
-
* Controls the spellCheck value for the content editable element of the
|
|
2076
|
+
* Controls the spellCheck value for the content editable element of the editor.
|
|
2077
2077
|
* Defaults to true, use false to disable spell checking.
|
|
2078
2078
|
*/
|
|
2079
2079
|
spellCheck?: boolean;
|
|
@@ -2133,7 +2133,7 @@ export declare interface MDXEditorProps {
|
|
|
2133
2133
|
*/
|
|
2134
2134
|
iconComponentFor?: (name: IconKey) => JSX.Element;
|
|
2135
2135
|
/**
|
|
2136
|
-
* Set to
|
|
2136
|
+
* Set to true if you want to suppress the processing of HTML tags.
|
|
2137
2137
|
*/
|
|
2138
2138
|
suppressHtmlProcessing?: boolean;
|
|
2139
2139
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $isListItemNode, $isListNode } from "@lexical/list";
|
|
2
|
-
import { $isTextNode } from "lexical";
|
|
2
|
+
import { $isTextNode, $isElementNode } from "lexical";
|
|
3
3
|
const LexicalListItemVisitor = {
|
|
4
4
|
testLexicalNode: $isListItemNode,
|
|
5
5
|
visitLexicalNode: ({ lexicalNode, mdastParent, actions }) => {
|
|
@@ -22,7 +22,7 @@ const LexicalListItemVisitor = {
|
|
|
22
22
|
});
|
|
23
23
|
let surroundingParagraph = null;
|
|
24
24
|
for (const child of lexicalNode.getChildren()) {
|
|
25
|
-
if ($isTextNode(child)) {
|
|
25
|
+
if ($isTextNode(child) || $isElementNode(child) && child.isInline()) {
|
|
26
26
|
if (!surroundingParagraph) {
|
|
27
27
|
surroundingParagraph = actions.appendToParent(listItem, {
|
|
28
28
|
type: "paragraph",
|