-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Bug]: Colgroup missing in JSON when using getJSON #5498
Comments
The colgroup element is derived from the JSON: tiptap/packages/extension-table/src/table.ts Lines 279 to 291 in ce141c2
Can you explain your usecase, why would you need it available in the JSON? |
Hey thanks so much for the quick reply. I am using TipTap as an editor for HTML emails via the library Vue Email. Currently I use a modified version of Gutentap, which is mostly a modified starter kit. Since email supports tables the transformation for them is just It would be ideal to have access to the colgroup info so I can do the same with it. |
Forgive me for my ignorance here. But my understanding would be that colgroup wouldn't really be necessary for your case since we already set the width on each table cell individually? I'm just trying to help you at at this point, I don't think that there is any way to get that information into the JSON, it is explicitly tied to table cell widths and there is not a great way to communicate changes across different extensions (it would have to be implemented as it's own node type to actually show in the JSON since that is what the JSON is ultimately trying to represent). If it is really necessary for your case, then I'm going to have to say that it is on you to implement that. I'd be willing to take a PR if it does not add too much complexity to how tables are implemented but I think that is just not really possible given what it does |
Thanks for the info, I will look into all the options you listed and make a pr if I think that is accomplishable. The width on the cells alone may be enough. I absolutely love this library thanks so much to you and all the maintainers. |
If anyone stumbles across this with the same issue, colwidth is an array, so it can't be passed straight to |
Affected Packages
extension-table
Version(s)
2.6.3
Bug Description
When using editor.getHTML() there is a colgroup used for resizing the columns. This is not present in the JSON returned from editor.getJson()
Browser Used
Chrome
Code Example URL
No response
Expected Behavior
I would expect there to be some sort of JSON object for colgroups.
Additional Context (Optional)
No response
Dependency Updates
The text was updated successfully, but these errors were encountered: