quill-delta-parser
quill-delta-parser copied to clipboard
Parse Quill 2 tables
Do you plan to add the ability to parse tables from Quill version 2?
Basic example of table from Quill version 2: [{"insert":"1111"},{"attributes":{"table":"row-nffr"},"insert":"\n"},{"insert":"2222"},{"attributes":{"table":"row-nffr"},"insert":"\n"},{"insert":"3333"},{"attributes":{"table":"row-nffr"},"insert":"\n"},{"insert":"4444"},{"attributes":{"table":"row-nffr"},"insert":"\n"},{"insert":"5555"},{"attributes":{"table":"row-nffr"},"insert":"\n"},{"attributes":{"table":"row-3or1"},"insert":"\n\n\n\n\n"},{"attributes":{"table":"true"},"insert":"\n\n\n\n\n"},{"insert":"\nThis text is outside the table.\n"}]
is there a doc? could you beautify that code? what is "nffr" and "row-nffr" and "row-3or1"? If its easy to implement, sure why not.
i need an official quill delta doc for tables, could not find anything. Post what your json values above would be expected as renderd html
Great, thanks for response. :)
The "nffr" is just an identifier for the row. I dont know about the other one. I have been working on this and ended up using better-tables-plus, as the output of a regular quill tables seems to break in the first cell.
This version also covers the ability to control the width of each column.
I made a custom parser for this, which is working. Still having issue on right align. tableparser.txt
Example of table structure in Better Tables Plus: better_tables_example.txt
but is there an official documentation how the delta for tables look like, so i could take a look? not sure its a good approach to implement a table support for a 3rd party library which is a fork. Maybe, if there is a documentation, we could provided it as "optional plugin" you can enable, and we name it also the same as the 3rd party library.