AD Amorim
what is the ideal column type to store the content of a Tiptap editor?
And also deal with deleting operations for a particular sections. Lots of fun but I don’t have the time to invest in it now.
If we get near 500kb I’ll have data to show my boss we need to invest in it. Once again thank you all for sharing your thoughts and suggestions!
10 replies
what is the ideal column type to store the content of a Tiptap editor?
Hi guys thanks again for these additional input. Appreciate!
Yeah… I’m building a kind of google doc with one single editor to render the whole page content. And we have a couple of custom nodes that generate more data than the basic rich text thing.
But I did the math again and my initial template for each page in JSON is actually 95KB…
I’ve decided for avoiding over engineering the solution for know. Since the record size limit is 600kb, I’ll have just another column inside the table to track the json size and see how close the pages are getting to 600kb.
If they became near 500kb I plan to split the content in another linked table since each item inside tiptap content is also a json object that can be considered as a section of the page. I had initially started doing this but it is a bit tricky to map the sections inside tiptap content to their xata id if my users have the ability of reordering the sections as they please. It seems I would need to create a plugin to ensure tiptap keeps the xata id of each section available for me to use…
10 replies
what is the ideal column type to store the content of a Tiptap editor?
Hi @Oreki & @50BytesOfJohn thank you so much for your inputs. Really appreciate!
Based on that and my initial tests, I'll start using a json column. The page component in this project has a preset that takes 120KB - which is too close to the limit xata imposed to text columns (200KB).
For now, I might be fine with a json column without worrying too much about it. However, I also see that xata has a Record size limit of 600 KB. So, in the near future I might need to break the page content into smaller chunks to access the whole content.
10 replies
how to make am update request without returning Xata metadata?
yep the issue ended up not being related to the Xata metadata. It was because client_id was returning only the object with its id inside... and zod was validating id + name.... So, when I got the name back it sorted the issue.
Also, returning is enough to remove xata metadata in the frontend code.
5 replies