Metadata-Version: 2.4
Name: docx2tiptap
Version: 0.1.2
Summary: Parse DOCX files and convert to TipTap JSON format
Project-URL: Homepage, https://github.com/legalise-io/dedit/tree/main/docx2tiptap
Project-URL: Repository, https://github.com/legalise-io/dedit
Project-URL: Issues, https://github.com/legalise-io/dedit/issues
Author: Legalise.io
License-Expression: AGPL-3.0-or-later
License-File: LICENSE
Keywords: document,docx,parser,prosemirror,tiptap,word
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: python-docx>=1.1.0
Provides-Extra: dev
Requires-Dist: build>=1.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: twine>=5.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# docx2tiptap

Parse DOCX files and convert to TipTap/ProseMirror JSON format.

## Installation

```bash
pip install docx2tiptap
```

## Usage

```python
from docx2tiptap import parse_docx, to_tiptap, create_docx_from_tiptap

# Parse DOCX to TipTap JSON
with open("document.docx", "rb") as f:
    elements, comments = parse_docx(f.read())
    tiptap_doc = to_tiptap(elements, comments)

# Export TipTap JSON back to DOCX
docx_buffer = create_docx_from_tiptap(tiptap_doc)
with open("output.docx", "wb") as f:
    f.write(docx_buffer.read())
```

## Features

- Parse DOCX paragraphs, headings, and tables
- Handle merged cells (colspan/rowspan)
- Preserve track changes (insertions/deletions)
- Extract and export comments
- Convert to/from TipTap JSON format

## License

AGPL-3.0-or-later
