# Edit documents with GroupDocs.Editor Round-trip a document through HTML so a web editor can change it, then save it back with GroupDocs.Total for .NET — runnable C# examples with downloadable files. GroupDocs.Editor has no user interface of its own, and that is the thing to understand before reading the code. It converts a document **to HTML** so that a third-party WYSIWYG editor — TinyMCE, CKEditor, anything that edits HTML — can display and change it, then converts the edited HTML **back** into the original format. So the shape is a three-stage round trip rather than a single call: ```text Editor.Edit() your web editor Editor.Save() document ──────────► EditableDocument ──► HTML ──► edited HTML ──────────► document ``` The examples below follow those three stages in order. ## Stage 1 and 2: open a document and get its HTML `Edit` returns an `EditableDocument`. `GetBodyContent` gives you the markup to hand to the browser; `GetEmbeddedHtml` gives a self-contained page with images and styles inlined. {{< tabs "editor-document-to-html" >}} {{< tab "C#" >}} ```csharp using System; using System.IO; using GroupDocs.Editor; using GroupDocs.Editor.Options; using (Editor editor = new Editor("contract.docx")) { // Stage 1: parse the document into an editable form using (EditableDocument document = editor.Edit(new WordProcessingEditOptions())) { // Stage 2: the HTML your web editor would load string bodyHtml = document.GetBodyContent(); File.WriteAllText("editor-document-to-html.html", document.GetEmbeddedHtml()); Console.WriteLine("Body HTML length: " + bodyHtml.Length + " characters"); } } ``` {{< /tab >}} {{< tab "contract.docx" >}} {{< tab-text >}} `contract.docx` is the sample file used in this example. Click [here](https://docs.groupdocs.com/total/net/_sample_files/contract.docx) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "editor-document-to-html.html" >}} ```text