-
Notifications
You must be signed in to change notification settings - Fork 3
Rich text markdown editor #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a rich text markdown editor using Milkdown, replacing the previous plain textarea-based markdown editor. The new editor provides a WYSIWYG interface with toolbar controls for formatting, along with source editing and preview modes.
Key changes:
- Integrated Milkdown library for rich text editing with markdown support
- Refactored
MarkdownEditorcomponent to include toolbar, WYSIWYG, raw markdown, and preview modes - Updated all form components to use refs instead of state for retrieving markdown content
- Enhanced file upload functionality to automatically embed images vs. link other file types
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added Milkdown dependencies (@milkdown/kit, @milkdown/react, @milkdown/utils) |
| src/services/fileService.ts | Added isMimeEmbeddable method to determine if a file should be embedded as an image |
| src/dictionaries/en.json | Added translations for new editor UI elements (formatting options, view modes) |
| src/dictionaries/sv.json | Added Swedish translations for new editor UI elements |
| src/components/MarkdownEditor/MarkdownEditor.tsx | Complete rewrite to implement Milkdown-based rich text editor with toolbar and multiple view modes |
| src/components/MarkdownEditor/MarkdownEditor.module.scss | Added comprehensive styling for toolbar, editor modes, and Milkdown components |
| src/components/PageForm/PageForm.tsx | Updated to use new MarkdownEditor API with refs; removed preview popup |
| src/components/NewsPostForm/NewsPostForm.tsx | Updated to use new MarkdownEditor API with refs; removed preview popup |
| src/components/DivisionPageForm/DivisionPageForm.tsx | Updated to use new MarkdownEditor API with refs; removed preview popup |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| required | ||
| > | ||
| <option disabled hidden value=""> | ||
| <option disabled hidden={group !== ''} value=""> |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hidden attribute should be set to true when group === '' to hide the placeholder option once a selection is made. The current logic is inverted - it hides the option when a group IS selected, but shows it when empty, which is the opposite of the typical pattern for placeholder options.
Are you talking about the fact that clicking the link button without any text selected does nothing? I think I could add some default behavior for that to make it always behave as expected. I'll look into fixing the toolbar. Thanks for the feedback! |
|
Ohhh yeah sorry, I forgot it worked that way. hmm... |
|
Something his happening when I try to make a list by typing dash and then space as well, the dash disappears sometimes Recording.2025-10-14.185430.mp4 |
|
Responding to all your points here:
|





Key Features
Known Issues
Screenshots