Skip to content

Commit

Permalink
fix: code block insertion
Browse files Browse the repository at this point in the history
Fixes #138
  • Loading branch information
petyosi committed Oct 24, 2023
1 parent 674c455 commit bae8fb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/examples/site-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import markdown from './assets/live-demo-contents.md?raw'
import { ALL_PLUGINS } from './_boilerplate'

export function Basics() {
return <MDXEditor markdown={markdown} plugins={ALL_PLUGINS} />
return <MDXEditor onChange={(md) => console.log(md)} markdown={markdown} plugins={ALL_PLUGINS} />
}
4 changes: 4 additions & 0 deletions src/plugins/codeblock/CodeBlockNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ export class CodeBlockNode extends DecoratorNode<JSX.Element> {
/>
)
}

isInline(): boolean {
return false
}
}

interface CodeBlockEditorContainerProps extends CodeBlockEditorProps {
Expand Down

0 comments on commit bae8fb2

Please sign in to comment.