-
-
Notifications
You must be signed in to change notification settings - Fork 23
Add support for Quill table modules (table attribute) #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: nadar <[email protected]>
|
@copilot your quill is wrong, i expect that you handle this quill into this html |
Co-authored-by: nadar <[email protected]>
Co-authored-by: nadar <[email protected]>
…ribute Co-authored-by: nadar <[email protected]>
nadar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot there is no celldata, you make assumptions no one asked for!
Your quill is wrong, i expect that you handle this quill
{
"insert": "Task Name",
"attributes": {
"bold": true
}
},
{
"insert": "\n",
"attributes": {
"table": "row-ylm9"
}
},
{
"insert": "Owner",
"attributes": {
"bold": true
}
},
{
"insert": "\n",
"attributes": {
"table": "row-ylm9"
}
},
{
"insert": "Status",
"attributes": {
"bold": true
}
},
{
"insert": "\n",
"attributes": {
"table": "row-ylm9"
}
},
{
"insert": "Completion (%)",
"attributes": {
"bold": true
}
},
{
"insert": "\n",
"attributes": {
"align": "center",
"table": "row-ylm9"
}
},
{
"insert": "UI Design"
},
{
"insert": "\n",
"attributes": {
"table": "row-x6o5"
}
},
{
"insert": "Jeet Kumar"
},
{
"insert": "\n",
"attributes": {
"table": "row-x6o5"
}
},
{
"insert": "Completed"
},
{
"insert": "\n",
"attributes": {
"table": "row-x6o5"
}
},
{
"insert": "100%",
"attributes": {
"italic": true
}
},
{
"insert": "\n",
"attributes": {
"align": "center",
"table": "row-x6o5"
}
},
{
"insert": "Backend API"
},
{
"insert": "\n",
"attributes": {
"table": "row-wt7t"
}
},
{
"insert": "Rahul Sharma"
},
{
"insert": "\n",
"attributes": {
"table": "row-wt7t"
}
},
{
"insert": "In Progress"
},
{
"insert": "\n",
"attributes": {
"table": "row-wt7t"
}
},
{
"insert": "65%",
"attributes": {
"italic": true
}
},
{
"insert": "\n",
"attributes": {
"align": "center",
"table": "row-wt7t"
}
},
{
"insert": "QA Testing"
},
{
"insert": "\n",
"attributes": {
"table": "row-nkq1"
}
},
{
"insert": "Anita Verma"
},
{
"insert": "\n",
"attributes": {
"table": "row-nkq1"
}
},
{
"insert": "Pending"
},
{
"insert": "\n",
"attributes": {
"table": "row-nkq1"
}
},
{
"insert": "0%",
"attributes": {
"color": "#e60000",
"italic": true
}
},
{
"insert": "\n",
"attributes": {
"align": "center",
"table": "row-nkq1"
}
}
into this html
<table>
<tbody>
<tr>
<td data-row="row-ylm9"><strong>Task Name</strong></td>
<td data-row="row-ylm9"><strong>Owner</strong></td>
<td data-row="row-ylm9"><strong>Status</strong></td>
<td data-row="row-ylm9" class="ql-align-center">
<strong>Completion (%)</strong>
</td>
</tr>
<tr>
<td data-row="row-x6o5">UI Design</td>
<td data-row="row-x6o5">Jeet Kumar</td>
<td data-row="row-x6o5">Completed</td>
<td data-row="row-x6o5" class="ql-align-center"><em>100%</em></td>
</tr>
<tr>
<td data-row="row-wt7t">Backend API</td>
<td data-row="row-wt7t">Rahul Sharma</td>
<td data-row="row-wt7t">In Progress</td>
<td data-row="row-wt7t" class="ql-align-center"><em>65%</em></td>
</tr>
<tr>
<td data-row="row-nkq1">QA Testing</td>
<td data-row="row-nkq1">Anita Verma</td>
<td data-row="row-nkq1"><u>Pending</u></td>
<td data-row="row-nkq1" class="ql-align-center">
<em style="color: rgb(230, 0, 0)">0%</em>
</td>
</tr>
</tbody>
</table>
Don’t invent any other Quill format than the one I gave you.
Co-authored-by: nadar <[email protected]>
... Fixed in commit 9e44c59. The Table listener now correctly handles the |
The Table listener has been updated in commits c7f50e3 and 9e44c59. There's no "celldata" - it now uses only Two notes on the expected HTML you provided:
|
|
@dishant-hupp would you like to give it a spin? |
I’ll pull the latest changes from this, test them on my end, and update you. I've also built a custom Table class and make custom listner for it, but I'm definitely interested in trying yours. |
|
@nadar I've thoroughly reviewed this update. While it works to some extent, the borders and overall formatting are not as expected. I've created a modified version that provides a much better visual result. However, there's an issue: when two tables are placed one after another, they are not recognized as separate entities and get merged, even when separated by a |
|
please post the problematic quill code here, so we can add it directly as unit test. |
|
Frontend Quill Generated Inspect HTML Code : |
|
But that looks good i would say @dishant-hupp ? |
This is not PDF parse output. Image shared it come from Frontend Editor where Quill is integrated. |
we have nothing to do with pdfs here, it might be a problem somewhere else, so please just post the quill and the html output from the parser |


Implements parsing for Quill table modules (quill-better-table, default table module) that use
tableattributes in delta format.Changes
New
Tablelistener (src/listener/Table.php)BlockListenerto handletableattributes on newlines<table><tbody><tr><td>structureUpdated
Alignlistener (src/listener/Align.php)tableattributeLexer integration (
src/Lexer.php)TableinloadBuiltinListeners()Test coverage
Usage
Notes
Listslistener for multi-element block structuresOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.