Add GetEditorStateAsString in events
This commit is contained in:
parent
1f2809193f
commit
710cbd0312
2 changed files with 22 additions and 2 deletions
|
@ -204,6 +204,17 @@
|
|||
component.dispatchEvent(new CustomEvent(eventType));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return in a callback the current history of the editor as string
|
||||
* @param callback
|
||||
*/
|
||||
public GetEditorStateAsString(callback: (state: string) => void) {
|
||||
const eventType = 'getEditorStateAsString';
|
||||
this.app.AddEventListener(eventType, callback);
|
||||
const component = this.GetEditorComponent();
|
||||
component.dispatchEvent(new CustomEvent(eventType));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current history of the editor
|
||||
* @param history Whole history of the editor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue