angular-xml-editor
Version:
XML editor component for Angular
55 lines (54 loc) • 2 kB
TypeScript
import { ControlValueAccessor } from '@angular/forms';
import { XmlEditorConfig } from './code/xmlEditorConfig';
import { DomDummyNodeManager } from './code/dummyNodes/domDummyNodeManager.class';
import { OnChanges, EventEmitter, Renderer2, OnDestroy, ElementRef } from '@angular/core';
import { AngularXmlEditorService } from './angular-xml-editor.service';
export declare class AngularXmlEditorComponent implements ControlValueAccessor, OnChanges, OnDestroy {
private _renderer;
private editorService;
private editorContext;
isDebugMode: boolean;
readonly config: XmlEditorConfig;
editorContextId: string;
debugMode: boolean;
textArea: ElementRef;
editorWrapper: ElementRef;
valueChange: EventEmitter<{}>;
domDummyNodeManager: DomDummyNodeManager;
private onTouchedFunction;
private onChangeFunction;
constructor(_renderer: Renderer2, editorService: AngularXmlEditorService);
ngOnChanges(): void;
ngOnDestroy(): void;
onLostFocus(): void;
onGotFocus(): void;
clicked(): void;
mousedown(): void;
mouseup(mouseEvent: MouseEvent): void;
pasted(text: string): boolean;
copied(): boolean;
keyDown(event: KeyboardEvent): boolean;
keyUp(event: KeyboardEvent): boolean;
showXml(xml: string): void;
/**
* Sets the function called when the control gets a change event
*/
registerOnChange(func: any): void;
/**
* Sets the function called when the control gets a touch event
*/
registerOnTouched(func: any): void;
/**
* Write the new value to the element
*/
writeValue(value: any): void;
/**
* Executed from the contenteditable section while the input property changes
* @param html html string from contenteditable
*/
onContentChange(html: string): void;
/**
* sets the disabled state for this element
*/
setDisabledState(isDisabled: boolean): void;
}