Files
rikx-beheer/lib/richtextVariants.ts
T
remco-vermeer 9be692974e Voeg CMS voor de Publieke Website toe (overgenomen van rikx-org)
Pagina-editor, hoofdmenu, SEO en media onder Publieke Website → Pagina's
(/website), los van het CMS in rikx-org: eigen tabellen in de beheerdatabase.
Blokken (hero, tekstblok, testimonial, voordelenlijst, call-to-action) met
Quill, NL/EN/DE met terugval op NL, en afbeeldingsupload naar MEDIA_DIR met
een openbare /media-route (CSP-sandbox).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:27:12 +02:00

18 lines
801 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Weergave van een tekstblok (CMS). Losse module zonder node:sqlite-import,
// zodat zowel BlockEditModal (client) als de server action deze lijst gebruikt.
// Ontbreekt de variant in de opgeslagen content, dan geldt "standaard".
export const RICHTEXT_VARIANTS = ["standaard", "oranje-balk", "kaart-grijs", "kaart-oranje"] as const;
export type RichtextVariant = (typeof RICHTEXT_VARIANTS)[number];
export const RICHTEXT_VARIANT_LABELS: Record<RichtextVariant, string> = {
standaard: "Standaard",
"oranje-balk": "Oranje balk (intro)",
"kaart-grijs": "Kaart – grijs",
"kaart-oranje": "Kaart – oranje rand",
};
export function isRichtextVariant(value: unknown): value is RichtextVariant {
return typeof value === "string" && (RICHTEXT_VARIANTS as readonly string[]).includes(value);
}