seehar / quill-better-table-plus

fork by quill-better-table. Module for better table in Quill, more useful features are supported.
MIT License
10 stars 5 forks source link

Wish: interface to set default column width and to scale tables to page width by default #12

Open berendengelbrecht opened 4 weeks ago

berendengelbrecht commented 4 weeks ago

Currently the default column width in quill-better-table-plus is defined as:

const COL_DEFAULT = {
  width: 100
};

As this is usually insufficient, I've changed it to 300 in my copy by changing the hardcoded literal value 100 to 300 in the minified code. Of course, that is not good practice, so I would like to see some interface to set this default in a future version.

If possible, it would be ideal if there also would be an option to format any table to 100% of the page width by default. A simple way of doing that would be to not call this.updateTableWidth(); in the constructor, but that method has the disadvantage that the column sizing row is initially not initialized properly. image

I'm using version 0.1.4 as there were issues after upgrading to 0.1.6 (if I find some indication as to why 0.1.6 did not work well for me, I'll post a separate issue).