ZDDC/browse/js
ZDDC 85e0061d6c feat(editor): hint recognized front-matter fields via server placeholder
The markdown editor's YAML front-matter pane was a bare textarea, so authors
had no way to discover the keys the converter honours — notably `doctype:`
(report|letter|specification) and `numbering:`, which have no other source.

Add a single server-side source of truth, convert.RecognizedFrontMatter() +
convert.FrontMatterPlaceholder(), and expose it as JSON at GET /.api/frontmatter
(handler.ServeFrontMatterTemplate; read-only, no auth — leaks only documented
field names). The browse editor fetches it once (server mode) and sets the
front-matter textarea's placeholder to the greyed hint, so an empty pane shows
the recognized keys with one-line hints. It's placeholder-only: it inserts
nothing, vanishes on the first keystroke, and arbitrary keys remain free —
front matter is still passed through to pandoc untouched. file:// mode shows no
placeholder (conversion is server-only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 08:23:25 -05:00
..
accept-transmittal.js refactor(browse): consolidate duplicated helpers into util.js; fix YAML save divergence 2026-06-03 15:07:00 -05:00
app.js feat(browse): capability/role/tier-driven, context-correct menu system 2026-06-04 07:21:02 -05:00
conflict.js feat(browse): lost-update protection for editors + shared conflict dialog 2026-06-03 16:24:15 -05:00
create-transmittal.js refactor(browse): consolidate duplicated helpers into util.js; fix YAML save divergence 2026-06-03 15:07:00 -05:00
download.js feat(browse): unify export formats via one matrix; add PDF to Export menu 2026-06-05 08:12:01 -05:00
events.js feat(browse): capability/role/tier-driven, context-correct menu system 2026-06-04 07:21:02 -05:00
grid.js feat(zddc): Phase 4b — grid mode driven by cascade default_tool 2026-05-11 16:15:25 -05:00
history.js refactor(browse): consolidate duplicated helpers into util.js; fix YAML save divergence 2026-06-03 15:07:00 -05:00
hovercard.js refine(browse): leaner menu — fold Navigate-into into Open, hide unpermitted actions, URL link in info box 2026-06-04 07:59:21 -05:00
init.js feat(browse): capability/role/tier-driven, context-correct menu system 2026-06-04 07:21:02 -05:00
loader.js refactor(browse): remove dead code, document state shape 2026-06-03 15:32:05 -05:00
menu-model.js feat(browse): unify export formats via one matrix; add PDF to Export menu 2026-06-05 08:12:01 -05:00
plan-review.js refactor(browse): consolidate duplicated helpers into util.js; fix YAML save divergence 2026-06-03 15:07:00 -05:00
preview-markdown.js feat(editor): hint recognized front-matter fields via server placeholder 2026-06-05 08:23:25 -05:00
preview-yaml.js feat(server): add declarative views: cascade key + ViewAt resolver (schema) 2026-06-04 09:53:53 -05:00
preview.js feat(browse): lost-update protection for editors + shared conflict dialog 2026-06-03 16:24:15 -05:00
stage.js refactor(browse): consolidate duplicated helpers into util.js; fix YAML save divergence 2026-06-03 15:07:00 -05:00
tree.js feat(browse): capability/role/tier-driven, context-correct menu system 2026-06-04 07:21:02 -05:00
upload.js refactor(browse): remove dead code, document state shape 2026-06-03 15:32:05 -05:00
util.js feat(browse): lost-update protection for editors + shared conflict dialog 2026-06-03 16:24:15 -05:00