From f14d352657b10fc7bc67b0580089452f0d8b61e6 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Sun, 17 May 2026 00:53:26 +0200 Subject: [PATCH] revert(editor): roll back textarea code editor (re-architecture in flight) The contenteditable + CodeJar + Prism approach (Tasks 1-12 + 4 smoke fixes shipped this session) hit too many contenteditable edge cases to ship: - Copy collapses multi-line selections to one line (Selection.toString() doesn't reliably reconstruct newlines across Prism's tokenized topology). - Enter sometimes requires two presses + cursor color shifts (caret lands "between" sibling tokenized spans; first Enter shifts it into a real text node, second actually inserts). - Cascade of earlier bugs already fixed (cursor jumped to start, then end; popup-accepted-quote duplicated; popup didn't accept at end-of-line) were all symptoms of the same root cause: manual Range API manipulation against tokenized contenteditable DOM is unreliable. Exiting the sunk-cost path before more fixes accrue. The next attempt will be a fresh brainstorming session weighing CodeMirror 6 (battle- tested, accepts a one-time bundler step) vs textarea-overlay (real + @@ -92,5 +92,4 @@ -{% include '_editor_assets.html' %} {% endblock %} diff --git a/l4d2web/l4d2web/templates/blueprints.html b/l4d2web/l4d2web/templates/blueprints.html index 3c29a4d..e121413 100644 --- a/l4d2web/l4d2web/templates/blueprints.html +++ b/l4d2web/l4d2web/templates/blueprints.html @@ -33,11 +33,9 @@