-
Notifications
You must be signed in to change notification settings - Fork 75
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
TypeError: Cannot read property 'replaceChild' of null #22
Comments
I'm not sure if what I'm about to suggest would resolve this issue, but let's give it a shot. Are you sure that there is a div with editor id in your DOM? By default, |
No, that's not accurate—the library will append to the element is it given, and doesn't hard-code any specific ids. Not sure why I missed this issue initially. @rj-david Did you solve this? If not, you're going to have to provide more details. |
Yes, I missed one crucial piece of information, and as such, my previous comment is not accurate. I wanted to point out that the code resulting in the error might have originated from the basic example. If so, it seems that the div with editor id was not present in DOM. I used the code snippet from the URL above and had an error with the same title. After adding a div with editor id to DOM prior to the script execution, the issue was resolved for me. |
We are hitting this constantly in production (we are working on a different editor that doesn't use prosemirror-menu):
|
That would happen when you create an editor that isn't in the DOM. We could add a condition to not call |
Probably would have saved us time if it just said that I was missing an editorView element :) We were unintentionally initializing an editor without an element |
Getting this error
The text was updated successfully, but these errors were encountered: