Api: return a Promise from htmlarea.doLoadingFinished() so etemplate can wait for it to be initialized

This commit is contained in:
nathan 2023-07-11 12:02:36 -06:00
parent 40ca54dfac
commit fb6f1654c7

View File

@ -17,7 +17,7 @@
import {et2_editableWidget} from "./et2_core_editableWidget"; import {et2_editableWidget} from "./et2_core_editableWidget";
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
import {WidgetConfig, et2_register_widget, et2_createWidget} from "./et2_core_widget"; import {et2_createWidget, et2_register_widget, WidgetConfig} from "./et2_core_widget";
import {et2_IResizeable} from "./et2_core_interfaces"; import {et2_IResizeable} from "./et2_core_interfaces";
import {et2_no_init} from "./et2_core_common"; import {et2_no_init} from "./et2_core_common";
import {egw} from "../jsapi/egw_global"; import {egw} from "../jsapi/egw_global";
@ -195,8 +195,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
doLoadingFinished() doLoadingFinished()
{ {
super.doLoadingFinished(); super.doLoadingFinished();
this.init_editor(); return this.init_editor();
return true;
} }
init_editor() { init_editor() {
@ -315,6 +314,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
activeElement && activeElement.focus && activeElement.focus(); activeElement && activeElement.focus && activeElement.focus();
} }
}); });
return this.tinymce;
} }
/** /**