Fix duplicate headers on HTMX nav, editor content loading, and double mount
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m14s

- Nest admin header inside post-header-child (layouts.py/helpers.py) so
  full-page DOM matches OOB swap structure, eliminating duplicate headers
- Clear post-header-child on post layout OOB to remove stale admin rows
- Read SX initial content from #sx-content-input instead of
  window.__SX_INITIAL__ to avoid escaping issues through SX pipeline
- Fix client-side SX parser RE_STRING to handle escaped newlines
- Clear root element in SxEditor.mount() to prevent double content on
  HTMX re-mount
- Remove unused ~blog-editor-sx-initial component

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 16:27:47 +00:00
parent df8b19ccb8
commit a98354c0f0
6 changed files with 14 additions and 19 deletions

View File

@@ -2249,7 +2249,9 @@
return null;
}
root.className = (root.className || "") + " sx-editor";
// Clear any previous mount
root.innerHTML = "";
root.className = (root.className || "").replace(/\bsx-editor\b/g, "").trim() + " sx-editor";
var container = el("div", { className: "sx-blocks-container" });
root.appendChild(container);