Skip to content

Markdown editor for Agenda Templates#260

Draft
dariusk wants to merge 3 commits intostagingfrom
dk/feat/28-markdown-editor
Draft

Markdown editor for Agenda Templates#260
dariusk wants to merge 3 commits intostagingfrom
dk/feat/28-markdown-editor

Conversation

@dariusk
Copy link
Collaborator

@dariusk dariusk commented Nov 18, 2025

What is in this PR?

This PR adds an option to CustomTextField that turns it into a markdown editor. The text field styling remains the same as always, there is just now a toolbar in the text field and you can apply markdown syntax and preview it.

Fixes #28

Changes in the codebase

This PR adds a fork of the markdown_editor_plus library as a dependency, and adds a boolean property of markdownEditor to CustomTextField. When set to true, the CustomTextField renders a markdown editor inside the normal styled text field box.

  • standard CustomTextField behavior still exists, it's just wrapped in if (!widget.markdownEditor)
  • the new behavior is behind an if (widget.markdownEditor) and calls a MarkdownAutoPreview component from the external library, passing in styling details so it remains consistent with
  • This should be completely compatible with @johnnycrich's changes in Text Field Improvements #202

Changes outside the codebase

  • The external dependency added currently lives here: https://github.com/dariusk/markdown_editor_plus
    • We may want to consider hosting this in the Berkman Github org
  • The BSD-3 license of markdown_editor_plus is AGPL-compatible so we are good on that front

Testing this PR

  • Create a template
  • Go to the agenda for the template
  • Click the edit button under Introductions as usual
  • image
  • Observe that the "Content" field now has a toolbar
  • image
  • Try applying bold and italic font
  • Try adding bullet points
  • Try adding a hyperlink
  • Try adding a header
  • Press the preview button (the eyeball icon in the upper left) and observe that the markdown renders
  • Press the preview button again to toggle the preview off.
  • image
  • Press the checkmark button to save the agenda item and observe that the item was saved
  • Try again with some changes but press the X button to cancel and observe the item was not saved

Additional information

I'd like a design review! Probably for the UI sync meeting this week.

This commit adds a fork of the `markdown_editor_plus` library as a
dependency, and adds a boolean property of `markdownEditor` to
`CustomTextField`. When set to `true`, the `CustomTextField` renders a
markdown editor inside the normal styled text field box.
@github-actions
Copy link

Visit the preview URL for this PR (updated for commit f6257f0):

https://gen-hls-bkc-7627--pr260-dk-feat-28-markdown-wgsacqar.web.app

(expires Tue, 02 Dec 2025 02:32:17 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: eed668cca81618d491d024574a8f8a6003deaa8d

@dariusk dariusk changed the title Dk/feat/28 markdown editor Markdown editor for Agenda Templates Nov 23, 2025
@dariusk
Copy link
Collaborator Author

dariusk commented Dec 10, 2025

Just had a review resulting in this todo list:

  • investigate text selection behavior
  • Header foldout button becomes just an H button that inserts h3
  • link popover
    • cmd+k, ctrk+k for calling the link popover
    • link popover should have a text field and a url field
    • when you highlight text and call the popover it should pre-fill the text field with the highlighted text
  • while in preview mode, clicking links should open them in a new tab
  • button to add numbered (ordered) lists
  • while on the same line as a bullet point or numbered list, pressing enter should make a newline with a followup bullet/number
  • tab left/right buttons that only work on bullet/numbered list lines
  • quote button
    • restyle quotes to "left border" style

@saihla saihla removed the request for review from johnnycrich January 8, 2026 00:29
@epenn
Copy link
Contributor

epenn commented Feb 4, 2026

@dariusk I know we shelved this until you put the finishing touches on community admin, but just wanted to doublecheck whether the review checklist above is up to date with what you'll need to dive into when you circle back to it. (Totally fine if so, just wanted to make sure since that was posted a bit ago.)

@saihla saihla marked this pull request as draft February 9, 2026 18:40
@katherineqian katherineqian removed their request for review February 26, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement rich text editor for agenda items

2 participants