From: Cyperghost Date: Thu, 19 Dec 2024 07:54:46 +0000 (+0100) Subject: Add a function to get the `focusTracker` from the ckeditor X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1e70d82fd2fb19eb4cba86723f17795e3a45b62e;p=GitHub%2FWoltLab%2FWCF.git Add a function to get the `focusTracker` from the ckeditor --- diff --git a/ts/WoltLabSuite/Core/Component/Ckeditor.ts b/ts/WoltLabSuite/Core/Component/Ckeditor.ts index 06bfe16aff..efa2dda198 100644 --- a/ts/WoltLabSuite/Core/Component/Ckeditor.ts +++ b/ts/WoltLabSuite/Core/Component/Ckeditor.ts @@ -163,6 +163,10 @@ class Ckeditor { get sourceElement(): HTMLElement { return this.#editor.sourceElement!; } + + get focusTracker(): CKEditor5.Utils.FocusTracker { + return this.#editor.ui.focusTracker; + } } function* findModelForRemoval( diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor.js index 45c91c58c9..092f913af9 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor.js @@ -125,6 +125,9 @@ define(["require", "exports", "tslib", "./Ckeditor/Attachment", "./Ckeditor/Medi get sourceElement() { return this.#editor.sourceElement; } + get focusTracker() { + return this.#editor.ui.focusTracker; + } } function* findModelForRemoval(element, model, attributes) { if (element.is("element", model)) {