From 5a15309be7d1024e368e52222aa2e9b5aa28077c Mon Sep 17 00:00:00 2001 From: erseco Date: Mon, 28 Sep 2026 18:28:09 +0100 Subject: [PATCH] Let the editor register its preview service worker editor/index.php stubbed every preview-sw.js registration, so the editor always fell back to a blob: preview. There the inlined theme CSS keeps relative url(...) images that cannot resolve, and the style icons (page navigation, menu toggle, footer logo) disappeared from the preview. The wrapper now lets the registration through and only absorbs a failed one, which keeps proxied routers such as moodle-playground quiet. Related to exelearning/exelearning#2476. --- docs/EMBEDDED_EDITOR.md | 27 +++++----- editor/index.php | 22 ++++---- tests/js/editor_service_worker_shim.test.js | 60 +++++++++++++++++++++ vitest.config.mjs | 3 +- 4 files changed, 89 insertions(+), 23 deletions(-) create mode 100644 tests/js/editor_service_worker_shim.test.js diff --git a/docs/EMBEDDED_EDITOR.md b/docs/EMBEDDED_EDITOR.md index 039504d1..69ea2e9c 100644 --- a/docs/EMBEDDED_EDITOR.md +++ b/docs/EMBEDDED_EDITOR.md @@ -78,19 +78,20 @@ full-screen overlay containing an `