diff --git a/lib/host/blog.sx b/lib/host/blog.sx index c2efd087..f880db78 100644 --- a/lib/host/blog.sx +++ b/lib/host/blog.sx @@ -98,21 +98,40 @@ (define host/blog-index (fn (req) (host/ok (host/blog-list)))) -;; ── create form (GET /new) — minimal chrome; the SX editor posts here too ── +;; ── create page (GET /new) — the real WYSIWYG block editor ────────── +;; Mounts the self-contained sx-editor.js (Ghost/Koenig-style block editor) that +;; serializes the visual edit to `sx_content`. Assets (sx-browser.js for Sx.parse, +;; sx-editor.js, editor.css) are referenced from the docs static host +;; (sx.rose-ash.com/static/scripts) — no host static-serving needed. On submit the +;; handle's getSx() fills the hidden sx_content field, then it POSTs to /new. +;; (This reuses the legacy JS editor; a native SX-island editor is the future.) +(define host/blog--asset "https://sx.rose-ash.com/static/scripts") (define host/blog-new-form (fn (req) (dream-html - (host/blog--page "New post" - (str - "

New post

" - "
" - "

" - "

" - "

" - "

" - "

← all posts

"))))) + (str + "New post" + "" + "" + "" + "
" + "" + "" + "
" + "
" + "" + "" + "all posts
" + "
" + "" + "" + "" + "")))) ;; ── write handlers ────────────────────────────────────────────────── ;; POST /new — form-urlencoded ingest (the editor's submit shape: title,