diff --git a/lib/host/blog.sx b/lib/host/blog.sx index 82d08658..51f16680 100644 --- a/lib/host/blog.sx +++ b/lib/host/blog.sx @@ -1374,16 +1374,23 @@ (define host/blog--block-editor (fn (slug) (let ((refs (host/blog-body-refs slug))) - (let ((rows (map (fn (c) (host/blog--block-row slug c)) refs)) - (type-opts (map (fn (ct) (quasiquote (option :value (unquote ct) (unquote ct)))) - (list "card-heading" "card-text" "card-quote" "card-code" "card-callout")))) + (let ((rows (map (fn (c) (host/blog--block-row slug c)) refs))) (quasiquote (div :id "block-editor" :style "margin-top:1.5em;border-top:1px solid #ccc;padding-top:1em" (h3 :style "font-size:1em;margin:0 0 0.3em" "Blocks") (unquote (if (> (len refs) 0) (cons (quote ul) rows) (quote (p :style "color:#999" "No blocks yet.")))) (form :method "post" :action (unquote (str "/" slug "/blocks/add")) :sx-post (unquote (str "/" slug "/blocks/add")) :sx-target "#block-editor" :sx-swap "outerHTML" - (select :name "ctype" (unquote (cons (quote span) type-opts))) + ;; options MUST be DIRECT children of must have selectable