TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
6.31k stars 434 forks source link

Export content to files such as .docx and PDF #564

Open DavidIlie opened 7 months ago

DavidIlie commented 7 months ago

Is your feature request related to a problem? Please describe. I am working on a note editor and I would like to see if it is possible to export the data of the editor into a PDF or a word document for the user. The issue is that I know the export HTML function exists, however that doesn't render styles properly at least with libraries like jsPDF and similar.

Describe the solution you'd like A function or an implementation that allows for a PDF or a document that follows the style of the editor as closely as possible

amanjr09-glitch commented 3 months ago

any updates regarding this feature?

YousefED commented 3 months ago

any updates regarding this feature?

Not yet!

Also see discord (https://discord.com/channels/928190961455087667/1236776510187372554)

image
amiranvarov commented 1 month ago

First of all, great work! Thank you for this cool stuff.

I just found that TipTap recently released the Pro package that will allow exporting into Docx and few other formats. (More info)

@YousefED Maybe you could download and reverse engineer their solution? Their Pro extension is free to download, just should create a free account.

YousefED commented 1 month ago

With the server-util package and blocksToFullHTML function you should be able to make good progress exporting a pdf.

Converting to Docx is probably more work and would require a sponsor for us to implement or a community contribution. As TipTap's pacakge is not open source I don't think using that as a base is a valid solution.