Add a function to get the `focusTracker` from the ckeditor
authorCyperghost <olaf_schmitz_1@t-online.de>
Thu, 19 Dec 2024 07:54:46 +0000 (08:54 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 8 Jan 2025 16:25:19 +0000 (17:25 +0100)
ts/WoltLabSuite/Core/Component/Ckeditor.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor.js

index 06bfe16affb94ab059077eeb6901723bee83e391..efa2dda198390d4ebad7f880cb0dcfd416280df9 100644 (file)
@@ -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(
index 45c91c58c9b989fab976ab593a147b94ef4bfb6d..092f913af9c1ccfdf784e4e9878a8ac9d961baea 100644 (file)
@@ -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)) {