Skip to content

Commit

Permalink
feat: editor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Ellison committed Nov 13, 2023
1 parent 0a2ff07 commit 18aa2b7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function Editor({ markdown: initialMarkdown, context }) {
onChange={editorCallback}
markdown={markdown}
plugins={[
// catchAllPlugin(),
catchAllPlugin(),
codeBlockPlugin({ codeBlockEditorDescriptors: [PlainTextCodeEditorDescriptor] }),
diffSourcePlugin({ diffMarkdown: initialMarkdown, viewMode: 'source' }),
headingsPlugin(),
Expand Down
16 changes: 9 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@mdx-js/loader": "^2.3.0",
"@mdx-js/mdx": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@mdxeditor/editor": "^1.5.0",
"@mdxeditor/editor": "^1.8.1",
"@mui/icons-material": "^5.11.11",
"@mui/material": "^5.11.7",
"@mui/utils": "^5.13.1",
Expand Down
7 changes: 6 additions & 1 deletion pages/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
// import type { CodeBlockEditorDescriptor } from '@mdxeditor/editor';
import Editor from '@/components/editor'
import { useState, useEffect } from "react";
import dynamic from 'next/dynamic'

export default function Page() {
const [markdown, setMarkdown] = useState('hello<Alert>test</Alert>');
const mkdown = `hello
<Alert>test</Alert>
more
`
const [markdown, setMarkdown] = useState(mkdown);



Expand Down

0 comments on commit 18aa2b7

Please sign in to comment.