RichTextBox converts editor HTML to a Word .docx file and back, entirely on your server, using
DocumentFormat.OpenXml — no Office install, no external service. The design goal is a faithful
round-trip of editor content, not a general-purpose Word converter, and this page is honest
about exactly what survives the trip.
DocxExporter turns the editor’s HTML into a downloadable Word document. It is served by the
/richtextbox/export endpoint (configurable via DocxExportEndpoint).
data: URIs (external URLs are skipped for safety).font-weight, font-style, text-decoration, color, background-color, text-align.Anything outside this surface is written as plain text — the exporter targets fidelity for editor output rather than arbitrary HTML.
DocxImporter reads an uploaded .docx and produces editor HTML. Enable it with the
/richtextbox/import/docx endpoint (configurable via DocxImportEndpoint); the client
wrapper is editor.aiToolkit.importDocx({ file, mode }) with a file-picker fallback.
mode is insert (at the caret) or replace (whole document).413; the request is license-checked.This is not a pixel-perfect Word importer. Images, footnotes, and complex Word styling are dropped on import. If you need a lossless round-trip, export from RichTextBox and re-import the same server’s output — that path is designed to survive intact.
DOCX support depends on DocumentFormat.OpenXml. The generated trial project already declares it;
in your own project add the package reference and register the endpoints:
<PackageReference Include="DocumentFormat.OpenXml" Version="3.1.0" />
See the DOCX export demo for a working
example, the class reference for
DocxExporter / DocxImporter, and Security
for how uploads are validated before they reach the importer.