The field is called
docx for backwards compatibility with hosts that
predate the text formats. It accepts any supported source.How the format is detected
In order:- An explicit
formaton the document input. - The filename extension, when the source is a
File. - The MIME type, when the source is a
Blobthat carries one. - DOCX, as the fallback.
Declaring the format explicitly
ABlob or ArrayBuffer assembled in memory has no filename, and its MIME
type may be missing or wrong. Say what it is:
What each format brings
DOCX
DOCX
The high-fidelity path. Styles, fonts, tables, images, sections, page
setup, running headers and footers, footnotes and endnotes, comments, and
tracked changes all survive, and all of them come back out on export.
Markdown
Markdown
Parsed into real blocks — headings become headings, tables become tables.
Since Markdown has no concept of pagination or revision marks, the document
opens with default page setup and no tracked changes.
Plain text
Plain text
Blank-line-separated paragraphs. Useful for pasted content and transcripts.
HTML
HTML
Structural markup is mapped to document blocks. Scripts, styles, and layout
CSS are ignored: this is a document importer, not a browser.
Titles
When you do not pass atitle, the SDK derives one from the filename, minus
the extension. Master Agreement.docx becomes “Master Agreement”.
Export
Export is DOCX:.docx, so
the SDK doubles as a conversion step in a pipeline that ends in Word.