From 3a7ec5d545162707475ff8451a41b251ed19f7f4 Mon Sep 17 00:00:00 2001 From: xdan Date: Fri, 1 Mar 2024 11:28:55 +0300 Subject: [PATCH] New version 4.0.18 Read more https://github.com/xdan/jodit/blob/main/CHANGELOG.md --- package-lock.json | 4 ++-- package.json | 2 +- src/jodit.ts | 11 +++++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 207956585..1607c237b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "jodit", - "version": "4.0.17", + "version": "4.0.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "jodit", - "version": "4.0.17", + "version": "4.0.18", "license": "MIT", "dependencies": { "autobind-decorator": "^2.4.0" diff --git a/package.json b/package.json index 2c5ec52ac..0a05f8411 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jodit", - "version": "4.0.17", + "version": "4.0.18", "description": "Jodit is awesome and usefully wysiwyg editor with filebrowser", "main": "build/jodit.min.js", "types": "./types/index.d.ts", diff --git a/src/jodit.ts b/src/jodit.ts index 2b4a8158c..de2ad02f9 100644 --- a/src/jodit.ts +++ b/src/jodit.ts @@ -1145,7 +1145,7 @@ export class Jodit extends ViewWithToolbar implements IJodit, Dlgs { /** * Hook after init */ - protected afterInitHook(): void { + protected afterInitHook(): CanPromise { // do nothing } @@ -1238,11 +1238,10 @@ export class Jodit extends ViewWithToolbar implements IJodit, Dlgs { this.e.fire('afterInit', this); } - this.afterInitHook(); - - this.setStatus(STATUSES.ready); - - this.e.fire('afterConstructor', this); + callPromise(this.afterInitHook(), () => { + this.setStatus(STATUSES.ready); + this.e.fire('afterConstructor', this); + }); }; callPromise(addPlaceResult, init);