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
Currently, the check to paste inside a lexical node uses the predicate INTERNAL_$isBlock to find an ancestor for a check to see if you're pasting into a code block, but if there isn't a block in the ancestors, the call fails cause it checks for '__language in firstBlock.
Lexical version: 0.12.6 - 14.6 (tested)
Steps To Reproduce
This simple custom Element node causes this problem, I can't get a paste event to not error without flipping isInline to true
Link to code example:
CodeSandbox isn't loading but when I get home I'll put one together
The current behavior
text-editor.comp.tsx:67 TypeError: Cannot use 'in' operator to search for '__language' in null
at RangeSelection.insertNodes (Lexical.dev.mjs:6273:1)
at RangeSelection.insertRawText (Lexical.dev.mjs:5863:1)
at $insertDataTransferForPlainText (LexicalClipboard.dev.mjs:90:1)
at editor.update.tag (LexicalPlainText.dev.mjs:76:1)
at processNestedUpdates (Lexical.dev.mjs:7928:1)
at beginUpdate (Lexical.dev.mjs:7979:1)
at updateEditor (Lexical.dev.mjs:8054:1)
at LexicalEditor.update (Lexical.dev.mjs:9587:1)
at triggerCommandListeners (Lexical.dev.mjs:7851:1)
at dispatchCommand (Lexical.dev.mjs:1258:1)
The expected behavior
The code in the copy buffer should be pasted
The text was updated successfully, but these errors were encountered:
Currently, the check to paste inside a lexical node uses the predicate
INTERNAL_$isBlock
to find an ancestor for a check to see if you're pasting into a code block, but if there isn't a block in the ancestors, the call fails cause it checks for'__language in firstBlock
.Lexical version: 0.12.6 - 14.6 (tested)
Steps To Reproduce
This simple custom Element node causes this problem, I can't get a paste event to not error without flipping isInline to true
Link to code example:
CodeSandbox isn't loading but when I get home I'll put one together
The current behavior
The expected behavior
The code in the copy buffer should be pasted
The text was updated successfully, but these errors were encountered: