Comments (14)
okay, its 2022... and no didn't find solution....
from quill-better-table.
Just curious, why this lib was built for quill v2 (dev)? I can't find any information about when quill v2 will be released. So, I just can't use this lib, because quill v2 is not production-ready yet, and I even don't know when it will be.
from quill-better-table.
@yuniwahuni I just encountered the same problem. React Quill uses Quill version ^1.3.7 which is incompatible with Quill Better Table.
from quill-better-table.
@aseidma Vue2-editor is implemented based on Quill 1.3.6, and its image drop/resize function also depends on 1.3.6. But quill-better-table needs to depend on quill 2.0.x-dev.x, so it is not possible to use quill-better-table in Vue2-editor.
from quill-better-table.
same error, using react:
package.json :
"quill-2.0-dev": "^2.0.0-dev.3",
"quill-better-table": "^1.2.10"
error on this line:
let thisBinding = quill.keyboard.bindings['Backspace'].pop();
After a debug, it seems that when the keyboard binding is added using:
quill.keyboard.addBinding({ key: 'Backspace' }, ...}
Quill normalizes the key name and instead of Backspace it makes it the actual key code: 8
Therefor, when trying to access it by the name, it doesn't find it.
Hope this helps
from quill-better-table.
Any solution found?? for the above issue
from quill-better-table.
I have never seen this error. The error occurs here: The code line. If you use the correct version of quilljs ? Quill-better-table requires: quill 2.0.x-dev.x.
from quill-better-table.
First , Thanks for your effort ^^
I have also same error on above. (I am programming in React)
package.json
"quill-2.0-dev": "^2.0.0-dev.3",
"quill-better-table": "^1.2.8",
better-table Module config
import React from 'react';
import ReactQuill, { Quill } from 'react-quill';
import { ImageUpload } from 'quill-image-upload';
import { ImageDrop } from 'quill-image-drop-module';
import ImageResize from 'quill-image-resize-vue';
import QuillBetterTable from 'quill-better-table';
import './quill.snow.css';
import {
toolbarOptions,
toolbarHandlers,
formats,
imageUploadConfig
} from './QuillConfig';
Quill.register('modules/imageUpload', ImageUpload);
Quill.register('modules/imageDrop', ImageDrop);
Quill.register('modules/imageResize', ImageResize);
Quill.register({ 'modules/better-table': QuillBetterTable }, true);
window.onbeforeunload = function() {};
class Editor extends React.Component {
constructor(props) {
super(props);
this.state = { text: '', theme: 'snow' }; // You can also pass a Quill Delta here
this.handleChange = this.handleChange.bind(this);
this.handleLength = this.handleLength.bind(this);
this.handleTableInsert = this.handleTableInsert.bind(this);
this.handleThemeChange = this.handleThemeChange.bind(this);
}
editorRef = React.createRef();
handleChange(delta) {
this.setState({ text: delta });
}
handleLength(value) {
console.log(`Editor HTML :${value}`);
}
handleChange2 = e => {
this.setState({ text: e });
console.log(this.state.text);
};
handleTableInsert = e => {};
handleThemeChange(newTheme) {
if (newTheme === 'core') newTheme = null;
this.setState({ theme: newTheme });
}
render() {
return (
<div>
<div class="btn-group">
<button id="insert-table" onClick={this.handleTableInsert}>
Insert table
</button>
<button id="get-table">Get table</button>
<button id="get-contents">Get contents</button>
</div>
<div className="text-editor">
<ReactQuill
id="scrolling-container"
ref={this.editorRef}
placeholder="Write something here..."
theme={this.state.theme}
modules={Editor.modules}
formats={Editor.formats}
value={this.state.text}
onChange={delta => this.handleChange(delta)}
getHTML={this.handleLength}
></ReactQuill>
</div>
</div>
);
}
}
Editor.modules = {
toolbar: {
container: toolbarOptions,
handlers: toolbarHandlers
},
imageDrop: true,
imageUpload: imageUploadConfig,
imageResize: {
displaySize: true
},
'better-table': {
operationMenu: {
items: {
unmergeCells: {
text: 'Another unmerge cells name'
}
}
}
},
keyboard: {
bindings: QuillBetterTable.keyboardBindings
}
};
Editor.formats = formats;
export default Editor;
Error Message is ...
TypeError: Cannot read property 'pop' of undefined
new quill_better_table_BetterTable
B:/Dev/10. WebASReact/web-as-client/node_modules/quill-better-table/dist/quill-better-table.js:4324
4321 | // expected my binding callback excute first
4322 | // I changed the order of binding callbacks
4323 |
> 4324 | let thisBinding = quill.keyboard.bindings['Backspace'].pop();
| ^ 4325 | quill.keyboard.bindings['Backspace'].splice(0, 1, thisBinding); // add Matchers to match and render quill-better-table for initialization
4326 | // or pasting
4327 |
from quill-better-table.
Any news on this? Running into the same issue when programming in Vue, using Vue2-Editor.
from quill-better-table.
I have encoured same issue in angular using ngx-quill-editor. Any solutions in angular?
Thanks.
from quill-better-table.
@rahul-geeks ngx-quill-editor uses Quill version "^1.3.1" which is incompatible with Quill Better Table.
I am sorry for that, quill 1.x cannot use quill-better-table yet. Not only because of this error, and also Container Blot changes a lot in quill 2.x.
from quill-better-table.
I also encountered such a problem. Is there a way to solve it now?
from quill-better-table.
Using NEXTJS
For me the solution was use this https://www.npmjs.com/package/react-quill-with-table instead of https://www.npmjs.com/package/react-quill, and use this module https://github.com/volser/quill-table-ui for the table usage
from quill-better-table.
Using NEXTJS
For me the solution was use this https://www.npmjs.com/package/react-quill-with-table instead of https://www.npmjs.com/package/react-quill, and use this module https://github.com/volser/quill-table-ui for the table usage
I met the same problem. Is it really works? I would really appreciate that if you have any example or screenshot to show what it looks like.
from quill-better-table.
Related Issues (20)
- Cannot center table with align tool.
- Hope to upgrade to Quill version 2.0.0 HOT 3
- display bug
- Is there any way to display operationMenu buttons in quill's toolbar instead of the right click pop up ?
- cannot add a ordered/unordered list to a table cell HOT 2
- Uncaught TypeError: Cannot read properties of undefined (reading 'next') HOT 1
- 如何修改单元格的width HOT 1
- Unexpected token ':' in Angular Project HOT 2
- How can I put the "merged function" into the toolbar?
- lower performance when paste a large doc which include many tables
- 怎样将table的Delta转换成html
- Modify column to specified width
- <p>` tags are adding instead of table. HOT 3
- TypeError: Cannot read properties of null (reading 'descendants')
- Cannot read properties of undefined (reading 'pop') HOT 5
- Are there plans to fix bugs, add features for this module?
- Error: [Parchment] Unable to create table blot
- Not working on quill v2.0.0-beta.0
- 作者大佬还更新吗?table 插件用不了,是不是紧跟一下 quill 的更新啊
- Operation-Menu goes outside screen size when Quill is near bottom: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quill-better-table.