Bug: TypeError: (0 , _lexical_table__WEBPACK_IMPORTED_MODULE_4__.getTableElement) is not a function - Missing getTableElement Export in Lexical Table Package #6831
I'm using Next.js along with the Lexical Rich Text Editor. When attempting to use the TableCellResizer plugin from Lexical, I encounter the following error in the browser:
`Unhandled Runtime Error
TypeError: (0 , _lexical_table__WEBPACK_IMPORTED_MODULE_4__.getTableElement) is not a function
The issue occurs at the following line in my TableCellResizer plugin code:
const tableElement = getTableElement(tableNode, editor.getElementByKey(tableNode.getKey()));
When I hover over getTableElement, I get the following message:
Module '"@lexical/table"' has no exported member 'getTableElement'.ts(2305)
Install the Lexical rich text editor and set it up with Next.js.
Add and configure the TableCellResizer plugin in your Lexical editor setup.
Try interacting with the table cells, triggering the plugin’s functionality.
Observe the browser console for the error.
Expected Behavior:
The getTableElement function should be available for use, or the plugin should function without throwing an error related to its absence.
Actual Behavior:
The getTableElement is not exported from the @lexical/table package, causing a TypeError when the TableCellResizer tries to use it.
This is because you're mixing code from an unreleased version of lexical with the latest released version. You will have to install a nightly release or wait for the next one.
Description:
I'm using Next.js along with the Lexical Rich Text Editor. When attempting to use the TableCellResizer plugin from Lexical, I encounter the following error in the browser:
`Unhandled Runtime Error TypeError: (0 , _lexical_table__WEBPACK_IMPORTED_MODULE_4__.getTableElement) is not a function
Source app(lexical)\plugins\TableCellResizer\index.tsx (122:17) @ tableNode `
Error Details:
The issue occurs at the following line in my TableCellResizer plugin code:
const tableElement = getTableElement(tableNode, editor.getElementByKey(tableNode.getKey()));
When I hover over getTableElement, I get the following message:Module '"@lexical/table"' has no exported member 'getTableElement'.ts(2305)
Environment Lexical version:
"@lexical/react": "^0.20.0", "lexical": "^0.20.0", "next": "14.2.17", "prettier": "^2.3.2", "react": "^18", "react-dom": "^18", "react-error-boundary": "^3.1.4", "react-katex": "^3.0.1", "y-websocket": "^1.5.4",
code example: i used the code example from Lexical Playground
Steps to Reproduce:
Expected Behavior: The getTableElement function should be available for use, or the plugin should function without throwing an error related to its absence.
Actual Behavior: The getTableElement is not exported from the @lexical/table package, causing a TypeError when the TableCellResizer tries to use it.