attoae / quill-table-better

A module that enhances the table functionality of Quill.
MIT License
59 stars 5 forks source link

[Bug] Adding a table in multiple editors #18

Closed S1owe closed 2 months ago

S1owe commented 2 months ago

The problem is as follows, if you initialize several quill text editors, the table component will only work on the last editor. This is reproduced in the sandbox, I attach a screenshot

Снимок экрана 2024-09-05 в 16 09 48
sylvainpe commented 2 months ago

And also, when using directional keys inside first editor, with of without table present, it auto focus the second editor. I played with quill event listeners to try to mitigate that, with no success.

attoae commented 2 months ago

Okay, I will fix it as soon as possible.

sylvainpe commented 2 months ago

I managed to fix the directional keys problem:

instead of : document.root.addEventListener('keyup', this.handleKeyup.bind(this));

do: quill.root.addEventListener('keyup', this.handleKeyup.bind(this));

For the first problem, I think ToolbarTable methods should not be static

S1owe commented 2 months ago

Thank you for the prompt solution of the problem!