@mdxeditor/editor 1.14.1 → 1.14.3
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/MDXEditor.js
CHANGED
|
@@ -75,6 +75,7 @@ const EditorRootElement = ({ children, className }) => {
|
|
|
75
75
|
React__default.useEffect(() => {
|
|
76
76
|
const popupContainer = document.createElement("div");
|
|
77
77
|
popupContainer.classList.add(styles.editorRoot);
|
|
78
|
+
popupContainer.classList.add(styles.popupContainer);
|
|
78
79
|
if (className) {
|
|
79
80
|
className.split(" ").forEach((c) => {
|
|
80
81
|
popupContainer.classList.add(c);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LexicalNode, RootNode as LexicalRootNode } from 'lexical';
|
|
2
2
|
import * as Mdast from 'mdast';
|
|
3
|
-
import {
|
|
3
|
+
import { type Options } from 'mdast-util-from-markdown';
|
|
4
4
|
import { ParseOptions } from 'micromark-util-types';
|
|
5
5
|
import { IS_BOLD, IS_CODE, IS_ITALIC, IS_UNDERLINE } from './FormatConstants';
|
|
6
6
|
/** @internal */
|
|
7
|
-
export type MdastExtensions =
|
|
7
|
+
export type MdastExtensions = Options['mdastExtensions'];
|
|
8
8
|
/**
|
|
9
9
|
* A set of actions that can be used to modify the lexical tree while visiting the mdast tree.
|
|
10
10
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { $createListItemNode } from "@lexical/list";
|
|
2
2
|
const MdastListItemVisitor = {
|
|
3
3
|
testNode: "listItem",
|
|
4
|
-
visitNode({ mdastNode, actions }) {
|
|
5
|
-
|
|
4
|
+
visitNode({ mdastNode, actions, lexicalParent }) {
|
|
5
|
+
const isChecked = lexicalParent.getListType() === "check" ? mdastNode.checked ?? false : void 0;
|
|
6
|
+
actions.addAndStepInto($createListItemNode(isChecked));
|
|
6
7
|
}
|
|
7
8
|
};
|
|
8
9
|
export {
|