Convert the editor's HTML to a Microsoft Word .docx file server-side and stream it back as a
download. Built on MIT-licensed DocumentFormat.OpenXml — no external service, no cloud API,
no DOCX SaaS subscription to wire up.
The endpoint is mapped automatically by MapRichTextBoxUploads().
using RichTextBox; builder.Services.AddRichTextBox(); var app = builder.Build(); app.MapRichTextBoxUploads(); // also maps POST /richtextbox/export/docx
editor.aiToolkit.exportDocx({ // all fields optional url: "/richtextbox/export/docx", fileName: "quarterly-update.docx", title: "Quarterly update", onError: function (err) { console.error(err); } });
The endpoint is a plain POST; feel free to call it from any stack (Blazor, JavaScript, even curl).
curl -X POST "https://your-site/richtextbox/export/docx" \ -H "Content-Type: application/json" \ -d '{ "html": "<p>Hello</p>", "title": "Memo" }' \ -o memo.docx