This commit is contained in:
2026-10-01 08:02:47 +01:00
parent 6392457ffb
commit 3dc9f12ad4
104 changed files with 6536 additions and 1037 deletions
+1 -3
View File
@@ -1,4 +1,4 @@
import React, { ComponentProps, useRef } from "react";
import React, { type ComponentProps, useRef } from "react";
import { twMerge } from "tailwind-merge";
import MarkdownEditorPreviewComponent from "./MarkdownEditorPreviewComponent";
import MarkdownEditorComponent from "./MarkdownEditorComponent";
@@ -73,7 +73,6 @@ export default function MarkdownEditor({
setValue={setValue}
value={value}
maxHeight={maxHeight}
refreshDepArr={[refresh]}
{...editorProps}
/>
<MarkdownEditorPreviewComponent
@@ -95,7 +94,6 @@ export default function MarkdownEditor({
setValue={setValue}
value={value}
maxHeight={maxHeight}
refreshDepArr={[refresh]}
{...editorProps}
/>
)}
@@ -1,4 +1,4 @@
import React, { ComponentProps } from "react";
import React, { type ComponentProps } from "react";
import AceEditor from "../../editors/AceEditor";
type Props = ComponentProps<typeof AceEditor> & {
@@ -1,8 +1,12 @@
import React, { ComponentProps, RefObject } from "react";
import React, { type ComponentProps } from "react";
import { twMerge } from "tailwind-merge";
// @ts-ignore
import { serialize } from "next-mdx-remote/serialize";
// @ts-ignore
import remarkGfm from "remark-gfm";
// @ts-ignore
import rehypePrismPlus from "rehype-prism-plus";
// @ts-ignore
import { MDXRemote, MDXRemoteSerializeResult } from "next-mdx-remote";
import Border from "../../elements/Border";
import { useMDXComponents } from "../mdx-components";
@@ -45,9 +49,11 @@ export default function MarkdownEditorPreviewComponent({
},
// scope: data,
})
// @ts-ignore
.then((mdxSrc) => {
setMdxSource(mdxSrc);
})
// @ts-ignore
.catch((err) => {});
} catch (error) {}
}, [value]);
@@ -58,7 +64,7 @@ export default function MarkdownEditorPreviewComponent({
className={twMerge(
`w-full max-h-[${maxHeight}] h-[${maxHeight}] block px-6 pb-10`,
"overflow-auto",
wrapperProps?.className
wrapperProps?.className,
)}
>
{mdxSource ? (