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.
I created a custom dialog for inserting images in mdxeditor. This dialog uses Uploadthing for image uploading. Here's the code:
in the image plugin:
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.