-
Notifications
You must be signed in to change notification settings - Fork 47
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
Support background colors for table #253
Comments
Will this feature be supported in future releases? Or can you give me a starting point, where I should start to build this, and then raise the MR for it. As I tried adding background-color to TableCell component from the browser-developer tools as well, but it doesn't work for me. |
I have no plans to implement this currently. In terms of where to start building this, I would recommend taking a look at the Tiptap docs on custom extensions https://tiptap.dev/docs/editor/extensions/custom-extensions. You will likely need to extend the TableCell extension, add a property to it, and use the property to render a color. |
I just want the support for it, for example if an existing html has a background-color property that should render inside the editor. |
The code below serves my usecase, but whether should I add this in mui-tiptap or not required is my ask, I can add the options in the Table bubble-menu as well if required, to support background-color for table cells.
|
Or In general, adding this snippet will support all the styles
|
Thanks for sharing the examples in case others would like to see. I don't have plans to incorporate this into mui-tiptap at this time, and as you say it will require some relatively tricky modifications to the table bubble menu, but the beauty of tiptap is that you can modify as you need and bring your own extensions based on your own specific use case. |
But we could at least add TableCellImproved via a PR, if you agree. That would enhance the rendering of HTML content by the editor. |
I think without additional functionality to utilize those new extension fields within mui-tiptap, and because it's so simple to define that sort of extension in a consuming project if someone wants it, there isn't much value in including that extension in mui-tiptap at this time. |
Is your feature request related to a problem? Please describe.
Currently table, has only support for toggling header cell, can we have support to provide custom background color for a cell in the table, as part of tableBubbleMenu
The text was updated successfully, but these errors were encountered: