Skip to content

Commit

Permalink
docs: ✏️ update doc for react
Browse files Browse the repository at this point in the history
  • Loading branch information
Saul-Mirone committed Oct 7, 2022
1 parent 7ea4934 commit f246bff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/pages/integrations/react/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { ReactEditor, useEditor } from '@milkdown/react';
import { commonmark } from '@milkdown/preset-commonmark';

export const MilkdownEditor: React.FC = () => {
const editor = useEditor((root) =>
const { editor } = useEditor((root) =>
Editor.make()
.config((ctx) => {
ctx.set(rootCtx, root);
Expand Down Expand Up @@ -63,7 +63,7 @@ const CustomImage: React.FC = ({ children }) => {
};

export const MilkdownEditor: React.FC = () => {
const editor = useEditor((root, renderReact) => {
const { editor } = useEditor((root, renderReact) => {
const nodes = commonmark
.configure(paragraph, { view: renderReact(CustomParagraph) })
.configure(image, { view: renderReact(CustomImage) });
Expand Down

0 comments on commit f246bff

Please sign in to comment.