angular-xml-editor
Version:
XML editor component for Angular
45 lines (44 loc) • 1.62 kB
TypeScript
import { Subject } from 'rxjs';
import { XmlRuleElement } from './xml-rules-check/xmlRuleElement.class';
import { XmlEditorConfig } from './xmlEditorConfig';
import { XmlEditorDebugger } from './xmlEditorDebugger';
import { XmlCursor } from './cursor/xmlCursor.class';
import { OnDestroy } from '@angular/core';
import { DomDummyNodeManager } from './dummyNodes/domDummyNodeManager.class';
export declare class XmlEditorContext implements OnDestroy {
private _document;
debugService: XmlEditorDebugger;
config: XmlEditorConfig;
actualCursorChanged: Subject<XmlCursor>;
actualCursor: XmlCursor;
dummyNodeManager: DomDummyNodeManager;
savedSelection: Range | null;
selectedText: string;
keyCtrlIsDown: boolean;
keyShiftIsDown: boolean;
constructor(_document: Document);
ngOnDestroy(): void;
setCursorPos(cursorPos: XmlCursor): void;
mouseUp(mouseEvent: MouseEvent): void;
keyDown(event: KeyboardEvent): boolean;
keyUp(event: KeyboardEvent): boolean;
pasted(text: string): boolean;
copied(): boolean;
insertText(value: string): boolean;
/** inserts a new element at the actual cursor pos */
insertElement(element: XmlRuleElement): void;
/**
* Create raw HTML
* @param html HTML string
*/
domInsertHtml(html: string): void;
/**
* save selection when the editor is focussed out
*/
saveSelection(): any;
/**
* restore selection when the editor is focussed in
*/
restoreSelection(): boolean;
cleanUpAndUpdateDummyElements(): void;
}