Skip to content

Copying to clipboard of react custom blocks that use context #592

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

Closed
YousefED opened this issue Feb 23, 2024 · 1 comment · Fixed by #641
Closed

Copying to clipboard of react custom blocks that use context #592

YousefED opened this issue Feb 23, 2024 · 1 comment · Fixed by #641
Labels
bug Something isn't working

Comments

@YousefED
Copy link
Collaborator

Copying the React Alert demo block doesn't work, because it's render function relies on React Context (for dropdown menu).

Overriding toExternalHtml doesn't suffice, because we also call toInternalHtml to set the blocknote data on the clipboard. However, toInternalHTML always calls render(), which depends on the React Context.

We need to review to usage of toInternalHTML and see if it needs to be customizable

@YousefED YousefED added the bug Something isn't working label Feb 23, 2024
@YousefED
Copy link
Collaborator Author

Possibly related: #623

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

Successfully merging a pull request may close this issue.

1 participant