GroupDocs.Editor for .NET API is a right choice to edit Microsoft Word, Excel, PowerPoint, Open Office documents and presentations. GroupDocs.Editor is a standalone API that is suitable for server side and back-end systems where high performance is required. It does not depend on any software like Microsoft or Open Office.
GroupDocs.Editor for .NET provides an easy and straightforward way for developers to edit the HTML files using a few lines of code.
Editor
class with mandatory file path or byte stream and load the HTML fileTextEditOptions
class instance for the HTML file formatEditor.Edit()
method and obtain HTML document in HTML format that is easily editable with any WYSIWYG-editor.Editor.Save()
method and save edited HTML file using TextSaveOptions
classA basic document editing with GroupDocs.Editor for .NET APIs can be done by implementing a few easy steps. Our APIs are supported on all major platforms and operating systems. Before executing the code below, please make sure that you have the following prerequisites installed on your system.
// Load the HTML file into Editor
Editor editor = new Editor("source.html");
// Create and adjust the HTML edit options
TextEditOptions editOptions = new TextEditOptions();
// Open input HTML document for edit — obtain an intermediate document, that can be edited
EditableDocument beforeEdit = editor.Edit(editOptions);
// Grab HTML document content and associated resources from editable document
string content = beforeEdit.GetEmbeddedHtml();
// Send the content to WYSIWYG-editor, edit it there, and send edited content back to the server-side
// This step simulates a such operation
string updatedContent = content.Replace("text", "Edited text");
// Grab edited content and resources from WYSIWYG-editor and create a new EditableDocument instance from it
EditableDocument afterEdit = EditableDocument.FromMarkup(updatedContent, null);
// Create and adjust the save options
TextSaveOptions saveOptions = new TextSaveOptions();
// Save edited HTML document to the file
editor.Save(afterEdit, "edited.html", saveOptions);
Edit HTML right now by visiting GroupDocs.Editor Live Demos website.
The live demo has the following benefits
No need to download API
No need to write any code
Just upload the source file
Get download link to save the file
You can also edit other file formats. Please see the complete list below.
(Microsoft Word Binary Format)
(Office 2007+ Word Document)
(Microsoft Word 2007 Marco File)
(Microsoft Word Template File )
(Microsoft Excel Spreadsheet (Legacy))
(Open XML Workbook)
(Macro-enabled Spreadsheet)
(Microsoft PowerPoint 97-2003)
(Open XML presentation Format)
(Macro-enabled Presentation File)
(Open Ebook Format)
(Open eBook File)
(Web Page Archive Format)
(Text Document)
(XML File)
(Comma Seperated Values)
(Portable Document Format)
(XML Paper Specifications)
(Outlook Message Item File)
(E-Mail Message)