Skip to content

TypeError: Cannot read properties of undefined (reading 'dom') #622

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
SadEaston opened this issue Mar 6, 2024 · 2 comments · Fixed by #635
Closed

TypeError: Cannot read properties of undefined (reading 'dom') #622

SadEaston opened this issue Mar 6, 2024 · 2 comments · Fixed by #635
Labels
bug Something isn't working

Comments

@SadEaston
Copy link
Contributor

When I try to access editor.domElement, I get this error that points to

get domElement() {
    return this._tiptapEditor.view.dom;
 }
@SadEaston SadEaston added the bug Something isn't working label Mar 6, 2024
@YousefED
Copy link
Collaborator

YousefED commented Mar 8, 2024

@lujdong can you share your full code? At which moment are you accessing domElement / with what goal? It's likely this can be solved using a ref on blocknoteview for example.

@SadEaston
Copy link
Contributor Author

@lujdong can you share your full code? At which moment are you accessing domElement / with what goal? It's likely this can be solved using a ref on blocknoteview for example.

I understand that using 'ref' can solve my problem. However, this bug still persists. I've tried accessing domElement at any given time and encountered errors, but when I print 'editor', 'domElement' appears to be present. I'm unsure as to why this is happening. Please refer to the minimal code example provided.

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.

2 participants