Key features
- Versatile Conversion: Convert DOCX, ODT, and Markdown documents to and from Tiptap’s JSON format, ensuring compatibility with a variety of tools and platforms.
- Easy Integration: Seamlessly integrate the Document Conversion API into your Tiptap Editor using our import and export extensions.
- Postman Collection: Use our Postman Collection to explore the API’s features and capabilities with hands-on examples.
How it works
Import endpoint
The /import
endpoint allows you to convert docx
, odt
, or markdown
files into Tiptap’s JSON format. Here’s how to use it:
- Method:
POST
- Required headers:
- Content-Type: multipart/form-data
- Authorization:
Bearer <YOUR_API_KEY>
- Body parameters:
file
: The document file to importformat
: Specify the format for special cases (e.g., gfm for GitHub Flavored Markdown)onImport
: A callback function to customize the import behavior
Export endpoint
The /export
endpoint converts Tiptap’s JSON format back into docx, odt, or markdown formats. Here’s the basic setup:
- Method:
POST
- Required Headers:
- Content-Type: application/json
- Authorization:
Bearer <YOUR_API_KEY>
- Body Parameters:
content
: The Tiptap JSON content to exportformat
: Desired export format (docx, odt, markdown)
Supported formats
- DOCX: Microsoft Word, Google Docs, OpenOffice, LibreOffice, and more
- ODT: OpenDocument Text format used by OpenOffice, LibreOffice, and others
- RTF: Rich Text Format used by various editors
- CommonMark: Standard Markdown format
- GFM: GitHub Flavored Markdown
Caveats and limitations
There are a few limitations for this beta first version to be aware of:
- Unsupported DOCX Elements: Page breaks, headers, footers, horizontal rules, and certain text styles are not currently supported on import.
- Suggestion Mode: Content added via suggestion mode is not included in the imported document.
- PDF Support: Importing and exporting PDF files is not yet supported.
We’re continually improving our import and export extensions, and your feedback is crucial. If you have feature requests or encounter any issues, let us know.
Get started
To start using the Document Conversion API, check out our docs. Simplify your document conversion process with Tiptap.
Let us know how it works for you and what we can improve.
Happy coding!