mdx-editor / editor

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

[BUG]- Irrelevant console.log on changing RichTextEditor #536

Open AhsanKhaan opened 1 month ago

AhsanKhaan commented 1 month ago

Describe the bug Whenever I Initialize RichTextEditor of MDX Editor I have noticed that on Changing MDX Editor it logs irrelevant data in as console.log(readOnly:false);

Reproduction Start from Adding MDXEditor RichtextEditor in your code on changing any values it gives readOnly:false in order to see that you need to reproduce that as following steps:

To Reproduce Steps to reproduce the behavior:

  1. Go to your application

  2. Insert Code as follow: `<MDXEditor contentEditableClassName={contentClass} ref={mdxEditorRef} markdown={markdown} onChange={onChange} plugins={[ toolbarPlugin({ toolbarContents: () => ( <> {" "}

                            <BoldItalicUnderlineToggles />
                            <ListsToggle />
                            <BlockTypeSelect />
                            <CreateLink />
                            <EmojiPicker
                                handleSelection={handleEmojiPickerChange}
                            />
                            {imageUploadHandler && <InsertImage />}
                            {/* <DiffSourceToggleWrapper /> */}
                        </>
                    ),
                }),
                listsPlugin(),
                quotePlugin(),
                headingsPlugin(),
                linkPlugin(),
                linkDialogPlugin(),
                imagePlugin({ imageUploadHandler }),
                diffSourcePlugin({
                    diffMarkdown: "An older version",
                    viewMode: "rich-text",
                }),
            ]}
        />`
  3. On changing any input it gives error: image

Expected behavior console should be clear

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.