mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.87k stars 141 forks source link

Adding Images does not seem to be working when using them in this format #476

Closed OSokunbi closed 4 months ago

OSokunbi commented 4 months ago

If you want to ask for support or request features, sponsor the project and contact me over email.

Describe the bug I'm trying to use the editor add the ability to create images using the standard way it is done from links in markdown, however it doesn't seem to be working

Reproduction use a MDXEditor like this: <MDXEditor markdown={# Hello} plugins={[ linkPlugin(), listsPlugin(), headingsPlugin(), codeBlockPlugin(), quotePlugin(), markdownShortcutPlugin(), thematicBreakPlugin(), tablePlugin(), imagePlugin(), ]} contentEditableClassName="prose-p:text-zinc-300 prose-li:text-zinc-300 pl-4 outline-none h-full w-full text-base py-5 caret-zinc-200 prose prose-invert prose-p:my-3 prose-p:leading-relaxed prose-headings:my-4 prose-blockquote:my-4 prose-ul:my-2 prose-li:my-0 prose-code:px-1 prose-code:text-red-500 prose-code:before:content-[''] prose-code:after:content-[''] prose-hr:after:content-[''] prose-a:underline prose-a:cursor-pointer" onChange={(content) => handleSave(content)} />

To Reproduce Steps to reproduce the behavior:

  1. try to type in a image

Expected behavior Image appears

petyosi commented 4 months ago

Sorry, but this is incomprehensible.