From a3a5aceeef5d2275966380cc4e7606692c63504a Mon Sep 17 00:00:00 2001 From: Saqib Date: Wed, 7 Oct 2026 20:12:05 +0530 Subject: [PATCH] CMS: give the Context fields a link button Switch the 12 Work/Events Context fields from the plain text widget to the markdown widget, limited to bold, italic, link and lists. The site already renders Context as Markdown, so editors no longer have to type [text](https://url) by hand. --- static/admin/config.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/static/admin/config.yml b/static/admin/config.yml index 5a4247d3..7abe15fb 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -136,7 +136,7 @@ collections: fields: - { label: "Project Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Solution", name: "solution", widget: "text", required: false } - { label: "Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Website URL", name: "url", widget: "string", required: false } @@ -169,7 +169,7 @@ collections: fields: - { label: "Project Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Solution", name: "solution", widget: "text", required: false } - { label: "Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Website URL", name: "url", widget: "string", required: false } @@ -200,7 +200,7 @@ collections: fields: - { label: "Project Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Solution", name: "solution", widget: "text", required: false } - { label: "Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Website URL", name: "url", widget: "string", required: false } @@ -231,7 +231,7 @@ collections: fields: - { label: "Project Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Solution", name: "solution", widget: "text", required: false } - { label: "Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Website URL", name: "url", widget: "string", required: false } @@ -262,7 +262,7 @@ collections: fields: - { label: "Project Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Solution", name: "solution", widget: "text", required: false } - { label: "Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Website URL", name: "url", widget: "string", required: false } @@ -292,7 +292,7 @@ collections: fields: - { label: "Project Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Solution", name: "solution", widget: "text", required: false } - { label: "Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Website URL", name: "url", widget: "string", required: false } @@ -322,7 +322,7 @@ collections: fields: - { label: "Project Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Solution", name: "solution", widget: "text", required: false } - { label: "Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Website URL", name: "url", widget: "string", required: false } @@ -352,7 +352,7 @@ collections: fields: - { label: "Event Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Event Type", name: "eventtype", widget: "hidden", default: "Data Dialogues" } - { label: "Banner Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Platform Link", name: "url", widget: "string", required: false, hint: "e.g. datadialogues.civicdatalab.in — shown as \"Explore the platform\"." } @@ -381,7 +381,7 @@ collections: fields: - { label: "Event Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Event Type", name: "eventtype", widget: "hidden", default: "Climate Dialogues" } - { label: "Banner Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Platform Link", name: "url", widget: "string", required: false, hint: "e.g. datadialogues.civicdatalab.in — shown as \"Explore the platform\"." } @@ -410,7 +410,7 @@ collections: fields: - { label: "Event Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Event Type", name: "eventtype", widget: "hidden", default: "CivicSabha 2.0" } - { label: "Banner Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Platform Link", name: "url", widget: "string", required: false, hint: "e.g. datadialogues.civicdatalab.in — shown as \"Explore the platform\"." } @@ -439,7 +439,7 @@ collections: fields: - { label: "Event Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Event Type", name: "eventtype", widget: "hidden", default: "India AI Impact Summit" } - { label: "Banner Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Platform Link", name: "url", widget: "string", required: false, hint: "e.g. datadialogues.civicdatalab.in — shown as \"Explore the platform\"." } @@ -473,7 +473,7 @@ collections: fields: - { label: "Event Name", name: "name", widget: "string" } - { label: "Summary", name: "summary", widget: "text", required: false } - - { label: "Context", name: "context", widget: "text", required: false } + - { label: "Context", name: "context", widget: "markdown", required: false, buttons: ["bold", "italic", "link", "bulleted-list", "numbered-list"], editor_components: [], hint: "Select text and use the link button to add a hyperlink." } - { label: "Date", name: "date", widget: "string", required: false, hint: "YYYY-MM-DD" } - { label: "Banner Image", name: "image", widget: "image", required: false, hint: "JPG, PNG or WebP only (no GIF/SVG). Keep it under 500 KB; larger files fail to save." } - { label: "Platform Link", name: "url", widget: "string", required: false, hint: "e.g. datadialogues.civicdatalab.in — shown as \"Explore the platform\"." }