How can I export the document content to docx? I have a custom view node in it

I am using tiptap vue3 to develop a document editor. Now I have a problem about how to export my document content. I have written many custom node views. When I use getHTML() to get the html, it does not return the content in the custom node view but only returns an empty tag, similar to this <custom-node></custom-node> When I browsed tiptap issues, I saw this editor.view.dom.innerHTML It can return all the content correctly, so should I use this My idea is to get the complete HTML first, and then render the HTML into docx through some plug-ins Is there any other way? Thanks

getHTML isn’t part of the ProseMirror API and this isn’t the forum for Tiptap, but assuming DOMSerializer is involved somewhere, the way you specify how your node is serialized to HTML is the toDOM method in the node spec. Though Tiptap probably renamed that too.

Though I don’t use Tiptap, I managed this myself in the (PHP) backend. On the server, I walk through every object Prosemirror created, and use PHPWord to render a Word document, then send it back to the client.