From 1e70d82fd2fb19eb4cba86723f17795e3a45b62e Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Thu, 19 Dec 2024 08:54:46 +0100 Subject: [PATCH] Add a function to get the `focusTracker` from the ckeditor --- ts/WoltLabSuite/Core/Component/Ckeditor.ts | 4 ++++ .../install/files/js/WoltLabSuite/Core/Component/Ckeditor.js | 3 +++ 2 files changed, 7 insertions(+) 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)) { -- 2.20.1