Closed Melvynx closed 3 weeks ago
I believe JSX and nested editor together have some issue to render complex markdown content, you can use Directive and nested editor to achieve the same thing, which works perfectly based on my experience :)
@Melvynx I am getting a lost in the complexity of your example. It looks weird to me that the code block remains on the same line as the rest of the content.
I tried to simplify things down to this sandbox, and, as far as I can tell, it works as expected. Can you replicate the problem here?
https://github.com/mdx-editor/editor/assets/13347/b5493d7c-f79b-4441-80c4-361355ae2004
Hi @petyosi, thank you. I know with the GenericJsxEditor
everything seems to work, but I am trying to create a more complex and custom JSX editor
without using the GenericJsxEditor
. There is a lack of documentation for that.
I do understand that, but I need your help in narrowing down the problematic part of your setup - it is quite complicated and I am lost in it. Can you pinpoint the difference between your implementation and the GenerixJsxEditor (source) and what you're doing that causes the problem?
Sorry, my fault. I use the wrong kind
:(
First, thanks you very much for this tool.
Describe the bug I create a custom
MdxZodEditor
that takes aZod
schema and renders the component with settings. Everything works well, except the children component seems to create a not-valid Markdown output.Reproduction
I created a full repository of the demo here: https://github.com/Melvynx/mdx-remote-bug-reproduction
To Reproduce Steps to reproduce the behavior:
/demo
in the NextJS app.Expected behavior The output must be a valid Markdown output.
Screenshots I uploaded a video demo here:
https://github.com/mdx-editor/editor/assets/56388157/0097e37e-d62c-4abb-b22c-c8ffe7a2781e
Desktop (please complete the following information):
Additional context In the repository, I have added all my code about the Zod Editor and everything to try and test.