Skip to content
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

Cannot read properties of undefined (reading 'pop') #93

Open
LeeQe opened this issue Aug 2, 2023 · 5 comments
Open

Cannot read properties of undefined (reading 'pop') #93

LeeQe opened this issue Aug 2, 2023 · 5 comments

Comments

@LeeQe
Copy link

LeeQe commented Aug 2, 2023

Cannot read properties of undefined (reading 'pop')
TypeError: Cannot read properties of undefined (reading 'pop')
at new quill_better_table_BetterTable (webpack-internal:///./node_modules/quill-better-table/dist/quill-better-table.js:3067:66)
微信截图_20230802174942

@atul60
Copy link

atul60 commented Aug 24, 2023

I am also getting exactly the same problem. Please provide a solution.

@cat-unicorn
Copy link

cat-unicorn commented Oct 5, 2023

I have the same error
In that line need to change bindings like this

    let thisBinding = quill.keyboard.bindings['8'].pop()
    quill.keyboard.bindings['8'].splice(0, 1, thisBinding)

Because Quill normalizes the key name and instead of Backspace it makes it the actual key code: 8

@eliasassuncao
Copy link

up

@kokiok3
Copy link

kokiok3 commented Dec 20, 2023

I have the same error In that line need to change bindings like this

    let thisBinding = quill.keyboard.bindings['8'].pop()
    quill.keyboard.bindings['8'].splice(0, 1, thisBinding)

Because Quill normalizes the key name and instead of Backspace it makes it the actual key code: 8

you save me!

++ add the route
node_modules > quill-better-table > dist > quill-better-table.js
At first I tried to change the code at quill-better-table.js in src and It doesn't work.
NOT src folder YES dist folder

@Ali-muhammed7040
Copy link

export const modules = {
table: false,
"better-table": {
operationMenu: {
items: {
unmergeCells: {
text: "Another unmerge cells name",
},
},
},
},
keyboard: {
bindings: quillBetterTable.keyboardBinding["8"].splice(
0,
1,
quillBetterTable.keyboardBinding["8"].pop()
),
},
toolbar: [
["bold", "italic", "underline"],
[{ header: [1, 2, 3, 4, 5, 6, false] }],
[{ list: "ordered" }, { list: "bullet" }],
[{ color: [] }, { background: [] }],
[{ size: ["normal", "small", "large", "huge"] }, "size"],
[{ indent: "-1" }, { indent: "+1" }],
[{ font: [] }],
[{ align: [] }],
["image"],
["pageBreak"],
["sceneBreak"],
],

imageUploader: {
upload: (file) => {
return new Promise((resolve, reject) => {
const params = {
Bucket: "simplymemoirs",
Key: images/${file.name},
Body: file,
ACL: "public-read",
};
s3.upload(params, (err, data) => {
if (err) {
console.error(err);
reject(err);
} else {
console.log(File uploaded successfully. URL: ${data.Location});
resolve(data.Location);
}
});
});
},
},
clipboard: {
// toggle to add extra line breaks when pasting HTML:
matchVisual: false,
},
imageResize: {
parchment: Quill.import("parchment"),
modules: ["Resize", "DisplaySize", "Toolbar"],
handleStyles: {
display: "block",
marginLeft: "auto",
marginRight: "auto",
cursor: "pointer",
},
},
cardEditable: true,
};
How to use in react????
Cannot read properties of undefined (reading '8')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants