You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
987.94bd8b52946dbc4b.js:9 Uncaught TypeError: Cannot read properties of null (reading 'firstChild')
at Y.addAll (987.94bd8b52946dbc4b.js:9:94126)
at Y.addElementByRule (987.94bd8b52946dbc4b.js:9:94028)
at Y.addElement (987.94bd8b52946dbc4b.js:9:92610)
at Y.addDOM (987.94bd8b52946dbc4b.js:9:91128)
at Y.addAll (987.94bd8b52946dbc4b.js:9:94220)
at _.parseSlice (987.94bd8b52946dbc4b.js:9:87860)
at eW (849baa33.2286729f2173c959.js:1:38904)
at tr (849baa33.2286729f2173c959.js:1:51532)
at tK.pasteHTML (849baa33.2286729f2173c959.js:1:90793)
at C.paste (4018.8ec8146930b55b85.js:1:149304)
The ParseRule can't find the DOM element. This can be fixed by changing:
renderHTML({ HTMLAttributes }) {
// renderHTML is used for copy/pasting content from the editor back into
// the editor, so we need to make sure the `blockContent` element is
// structured correctly as this is what's used for parsing blocks. We
// just render a placeholder div inside as the `blockContent` element
// already has all the information needed for proper parsing.
const div = document.createElement("div");
div.setAttribute("data-editable", "true");
and adding div.setAttribute("data-tmp-placeholder", "true");
Let's:
a) diagnose why this goes wrong now (seems like a regression)
b) add unit tests
c) create a proper fix (not sure if the above is a proper fix or not without step (a))
Describe the bug
987.94bd8b52946dbc4b.js:9 Uncaught TypeError: Cannot read properties of null (reading 'firstChild')
at Y.addAll (987.94bd8b52946dbc4b.js:9:94126)
at Y.addElementByRule (987.94bd8b52946dbc4b.js:9:94028)
at Y.addElement (987.94bd8b52946dbc4b.js:9:92610)
at Y.addDOM (987.94bd8b52946dbc4b.js:9:91128)
at Y.addAll (987.94bd8b52946dbc4b.js:9:94220)
at _.parseSlice (987.94bd8b52946dbc4b.js:9:87860)
at eW (849baa33.2286729f2173c959.js:1:38904)
at tr (849baa33.2286729f2173c959.js:1:51532)
at tK.pasteHTML (849baa33.2286729f2173c959.js:1:90793)
at C.paste (4018.8ec8146930b55b85.js:1:149304)
To Reproduce
https://www.blocknotejs.org/docs/custom-schemas/custom-blocks#custom-block-types. the sample has the same issue, here is a video. and The procedure is Select some text -> copy(command + C on Mac) -> paste(command + V on mac). you will see the error log
CleanShot.2024-10-14.at.17.12.20.mp4
Misc
The text was updated successfully, but these errors were encountered: