Skip to content

Commit

Permalink
add image support to markdown editor
Browse files Browse the repository at this point in the history
  • Loading branch information
dekanbro committed May 24, 2024
1 parent 193831f commit 14a4d28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/customFields/MDXEditorField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
DiffSourceToggleWrapper,
diffSourcePlugin,
codeBlockPlugin,
imagePlugin,
InsertImage,
} from "@mdxeditor/editor";
import "@mdxeditor/editor/style.css";
import styled from "styled-components";
Expand Down Expand Up @@ -78,12 +80,14 @@ export const MDXEditorField = (props: Buildable<Field>) => {
headingsPlugin(),
linkPlugin(),
linkDialogPlugin(),
imagePlugin(),
toolbarPlugin({
toolbarContents: () => (
<>
<DiffSourceToggleWrapper>
<BoldItalicUnderlineToggles />
<CreateLink />
<InsertImage />
<ListsToggle /> <BlockTypeSelect />
<UndoRedo />
</DiffSourceToggleWrapper>
Expand Down

0 comments on commit 14a4d28

Please sign in to comment.