soccerloway / quill-better-table

Module for better table in Quill, more useful features are supported.
MIT License
313 stars 119 forks source link

Copy - paste almost works perfectly #2

Closed olliraa closed 5 years ago

olliraa commented 5 years ago

Hi.

This plugin is just awesome, the missing support for tables has been a real problem, because people (especially engineers ;) take copy - paste from Excel as granted feature.

I found a bug/problem with the copy - paste feature. If I try to copy a table, the pasted table looks kinda odd -> the borders for the second column are missing? Here's an example:

https://drive.google.com/file/d/1rfpHVa4Y5DbI_vn4Inc5Y7Dj_N4TAWmS/view?usp=sharing

soccerloway commented 5 years ago

@olliraa Thank you for encouraging. I tried copying a table from Mac Numbers, then pasted in the demo. It worked well. Would you please tell me more details? I must be glad to fix it. Is there any lists in the copied table cell ? List in table cell is not currently supported.

olliraa commented 5 years ago

Hi, thanks for the reply :) The problem is that if I copy paste a 2x2 table from Excel (Windows) from cells (A1, B1, A2, B2) only the A1 and A2 have borders. If I copy the same content from anywhere else in the same Excel sheet, I get borders for all the 4 cells. Weird :) See here: [https://drive.google.com/file/d/1UC-dJIQvBU2fqFDNPtvdvmMP7XUPuyg0/view?usp=sharing]

soccerloway commented 5 years ago

@olliraa Thanks a lot. I reproduced this bug just now. I found that the HTML structure of a table copied from Excel has some col tags missing. col tags are important for the width of table cell. The column will be 0 width if the corresponding col tag missing, and it looks like the borders for the column are missing. I will fix it in next few days.

By the way, I found another bug that empty table cells are missing durring pasting. Thank you :)

olliraa commented 5 years ago

Great, thank you soo much :)

soccerloway commented 5 years ago

@olliraa This problem has been fixed in v1.1.2, update the package, you will have a better table:). Star me and give me more suggestions. lol~

olliraa commented 5 years ago

Awesome work, I'll star you definitely :) Btw, is it possible to center the table you have pasted into the editor? Just tested with your Codepen demo, and as there are no (left - center - right) align buttons, I don't know if it's possible or not.

-Olli

pe 3. toukok. 2019 klo 16.06 Loway (notifications@github.com) kirjoitti:

@olliraa https://github.com/olliraa This problem has been fixed in v1.1.2, update the package, you will have a better table:). Star me and give me more suggestions. lol~

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/soccerloway/quill-better-table/issues/2#issuecomment-489088653, or mute the thread https://github.com/notifications/unsubscribe-auth/AD6L6G2GOBSMHJN6K5QC6OLPTQ2G5ANCNFSM4HITFF4Q .

soccerloway commented 5 years ago

@olliraa Thanks a lot. About alignment for table First, I wrapped table with a scrollable div to show intact table, and the width of scrollable div was 100 percent. Second, to achieve that, it must change the layout styles and change the algorithm for table operations. The complexity will increase. Unfortunately, I think that alignment for table is hard to achieve in this repo. But it is easy to center the table by margin: 0 auto in rendering. I will open a new issue for your requirement to discuss.

olliraa commented 5 years ago

Hi.

Thanks for the quick reply :) Centering the tables would be great for all "info tv projects" like mine. As the users are not professionals (and especially people with engineering background) are somehow crazy about (Excel) tables, possibility to center the table nicely (in the info tv screen) would really be the icing on the cake here :) Images have this "menu" for left - center - right when you click on them, but I guess that's not as easy to implement for tables as I thought 🤔 This development is still going really strong, thanks to you 👍

All the best,

-Olli

ti 7. toukok. 2019 klo 5.36 Loway (notifications@github.com) kirjoitti:

@olliraa https://github.com/olliraa Thanks a lot. About alignment for table First, I wrapped table with a scrollable div to show intact table, and the width of scrollable div was 100 percent. Second, to achieve that, it must change the layout styles and change the algorithm for table operations. The complexity will increase. Unfortunately, I think that alignment for table is hard to achieve in this repo. But it is easy to center the table by margin: 0 auto in rendering. I will open a new issue for your requirement to discuss.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/soccerloway/quill-better-table/issues/2#issuecomment-489884224, or mute the thread https://github.com/notifications/unsubscribe-auth/AD6L6G6XX6JPAJVOQRXFBE3PUDTK3ANCNFSM4HITFF4Q .