tui.editor
tui.editor copied to clipboard
There is an error when select table cell
There is an error when select table cell
In my nextjs project. I want to select mul cell in table,then an error: TypeError: Class constructor Selection cannot be invoked without 'new'. This has nothing to do with this plugin---@toast-ui/editor-plugin-table-merged-cell. I had this problem using basic features.
Reproduce / Screenshots
My project info:
"dependencies": {
"@toast-ui/editor-plugin-chart": "^3.0.1",
"@toast-ui/editor-plugin-code-syntax-highlight": "^3.0.0",
"@toast-ui/editor-plugin-color-syntax": "^3.0.3",
"@toast-ui/editor-plugin-table-merged-cell": "^3.0.2",
"@toast-ui/editor-plugin-uml": "^3.0.1",
"@toast-ui/react-editor": "^3.1.7",
"axios": "^0.27.2",
"html-react-parser": "^1.4.14",
"next": "^12.1.7-canary.29",
"prismjs": "^1.28.0",
"quill-better-table": "^1.2.10",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-quill": "^2.0.0-beta.4",
"sharp": "^0.28.3",
"styled-components": "^5.3.5"
},
"devDependencies": {
"@types/node": "17.0.35",
"@types/react": "18.0.9",
"@types/react-dom": "18.0.5",
"eslint": "8.16.0",
"eslint-config-next": "12.1.6",
"typescript": "4.7.2"
},
"resolutions": {
"prosemirror-model": "1.17.0",
"prosemirror-view": "1.18.1"
},
Device info:
- Device: [PC]
- OS: [win 11]
- Browser [google chrome]
error screenshot
@jiayoujun Is it on SSR env? We don't support SSR yet.
try use prosemirror-state with version 1.3.4 and prosemirror-transform version 1.4.2 prosemirror-state after1.3.4 ported to typescript and lead to "Class constructor Selection cannot be invoked without 'new'"
try use prosemirror-state with version 1.3.4 and prosemirror-transform version 1.4.2 prosemirror-state after1.3.4 ported to typescript and lead to "Class constructor Selection cannot be invoked without 'new'"
works for me ! thx
Hi everyone! After adding prosemirror-state and prosemirror-transform problem with runtime error was resolved, but I have one more problem - wrong paste table. Does anybody have this problem? Or maybe anybody knows how it fix?
https://github.com/nhn/tui.editor/assets/133666945/7c538b63-eb1c-4e6e-9e37-1d1e2345acb0
Markdown after paste in table:
| test1 | test2 | |
| ----- | ----- | --- |
| test1 |
| test3 |
| |
| --- |
| test3 |
Hello ~ I also have same problem like the obove. I am using originally node v20.9.0. So, after installing NVM and downgrade the node version as v16.19.0. and then, it works.
hope that it will be helpful to another one having the same issues~