Custom Dialog for Inserting Images in MDXEditor #561
yassersaidi
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
@yassersaidi Is there a way to auto-add this element in the component if we paste an image link from the clipboard or drag-drop an image directly in the content area, as it would work for the default image component? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I created a custom dialog for inserting images in mdxeditor. This dialog uses Uploadthing for image uploading. Here's the code:
This code defines a new custom dialog component, AddImage, which allows users to insert images into the editor. The dialog includes both an upload dropzone (using Uploadthing) and fields for manually entering image source and title. Add the component to your toolbarContents to include it in the editor's toolbar.
Beta Was this translation helpful? Give feedback.
All reactions