Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ChangeAdmonitionType plugin throws when it's included #322

Open
2 tasks done
dave-db opened this issue Jan 19, 2024 · 2 comments
Open
2 tasks done

[BUG] ChangeAdmonitionType plugin throws when it's included #322

dave-db opened this issue Jan 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dave-db
Copy link

dave-db commented Jan 19, 2024

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • I have read the documentation and cannot find an answer.

Describe the bug
Adding the ChangeAdmonition type plugin to the active plugin list throws TypeError: Cannot read properties of null (reading 'rootNode')

Reproduction
codesandbox

To Reproduce
Steps to reproduce the behavior:
Load the sandbox

Expected behavior
No error!

Desktop (please complete the following information):
MacOS, Chrome 119, mdx-editor 2.3.4

@dave-db dave-db added the bug Something isn't working label Jan 19, 2024
@petyosi
Copy link
Contributor

petyosi commented Jan 19, 2024

The ChangeAdmonition component needs some specific setup to work as expected. See how it's setup in the KitchenSinkToolbar. https://github.com/mdx-editor/editor/blob/main/src/plugins/toolbar/components/KitchenSinkToolbar.tsx

This should be documented better of course. I would appreciate a PR, there's so much work in the details here.

@dave-db
Copy link
Author

dave-db commented Jan 22, 2024

Grand, thank you. Let me see if I can help with a PR on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants