Editor Class
Main class, which encapsulates conversion methods. Editor class provides methods for loading, editing, and saving documents of all supportable formats. It is disposable, so use a 'using' directive or dispose its resources manually via 'Dispose()' method call. Document loading is performed through constructors. Document editing - through method 'Edit', and saving back to the resultant document after edit - through method 'Save'.
Inheritance Hierarchy
SystemObject
  GroupDocs.EditorEditor

Namespace: GroupDocs.Editor
Assembly: GroupDocs.Editor (in GroupDocs.Editor.dll) Version: 22.7.0.0
Syntax
public sealed class Editor : IAuxDisposable

The Editor type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyIsDisposed
Indicates whether this Editor instance was already disposed and cannot be used anymore (true) or it was not disposed yet and thus is active (false)
Methods
  NameDescription
Public methodDispose
Disposes this instance of Editor, so that it releases all internal resources and becomes unavailable for further usage
Public methodEdit
Opens a previously loaded document for editing using default options by generating and returning an instance of 'EditableDocument' class, that, in turn, contains methods for producing HTML markup and associated resources.
Public methodEdit(IEditOptions)
Opens a previously loaded document for editing using specified format-specific options by generating and returning an instance of 'EditableDocument' class, that, in turn, contains methods for producing HTML markup and associated resources.
Public methodGetDocumentInfo
Returns metadata about the document, that was loaded to this 'Editor' instance
Public methodSave(EditableDocument, Stream, ISaveOptions)
Converts specified edited document, represented as instance of 'EditableDocument', to the resultant document of specified format and saves its content to specified stream
Public methodSave(EditableDocument, String, ISaveOptions)
Converts specified edited document, represented as instance of 'EditableDocument', to the resultant document of specified format and saves its content to file by specified file path
Events
  NameDescription
Public eventDisposed
Event, which occurs when this Editor instance is disposed with all its internal resources
Remarks
Editor class should be considered as an entry point and the root object of the GroupDocs.Editor. All operations are performed using this class. Typical usage of the Editor class for performing a full document editing pipeline is the next:
  1. Load a document into the Editor instance through its constructor.
  2. Optionally, detect a document type using a GetDocumentInfo(String) method.
  3. Open a document for editing by calling an Edit(IEditOptions) method and obtaining an instance of EditableDocument class from it.
  4. Editing a document content on client-side using any WYSIWYG HTML-editor.
  5. Creating a new instance of EditableDocument from edited document content.
  6. Saving an edited document to some output format by calling a Save(EditableDocument, Stream, ISaveOptions) method.
  7. Disposing an instance of Editor class via 'using' operator or manually.
See Also