You are here: Plugin API > Library Reference > IHost Interface > IEditorContext Interface
IEditorContext Interface
An instance of IEditorContext is returned using the GetEditorContext() method in the IHost interface. IEditorContext gives access to opened MadCap documents in the editor.
Events
- DocumentSwitched - Occurs when the active document changes.
Methods
- IDocument GetActiveDocument() - Returns the currently active IDocument.
- IEnumerable<IDocument> GetDocuments() - Returns a System.Collections.IEnumerable containing all the IDocument(s) currently open.
- XmlSchema GetMadCapSchema() - Returns the System.Xml.Shema.XmlSchema of available MadCap element names.
- IDocument OpenDocument(string) - Opens the given file path and returns the associated IDocument.
- IDocument OpenDocument(string, EditorView) - Opens the given file path in the EditorView passed in and returns the associated IDocument.