feat: #3586585 Add YAML support to the MDX editor code blocks
Description
- YAML is now available as a code block language in the rich text (MDX) editor. When inserting a code block and choosing a language from the dropdown, "YAML" now appears alongside the existing options (JavaScript, Python, CSS, JSON, etc.), with proper syntax highlighting.
- Fixed a bug where code blocks in certain languages couldn't be typed into. Previously, choosing a language other than JavaScript or CSS for a code block (for example Python, or the newly added YAML) would silently stop accepting any keyboard input — the block looked fine but nothing you typed showed up. This is now fixed, so every language in the dropdown works as expected.
- Added automated tests to verify: (1) YAML shows up correctly as a selectable, labeled language, and (2) code blocks in YAML and Python actually accept typed text — so this specific bug can't silently reappear in the future.
Testing instructions
- Using ai_agents ^1.3, create an AI agent.
- In the instructions field, insert a code block.
- Try to set the code block language to YAML and verify that code can be added
Checklist
- I have linked the related issue in the MR title or description
- I have performed a self-review of my own code
- I have added or updated tests, or explained in the description why this change is not covered by tests
- I have updated documentation for any new or changed functionality
- I have written testing instructions and verified them locally
- I have noted any required post-merge steps (config imports, cache rebuilds, manual changes)
- This MR contains no breaking API or hook changes, or they are explicitly documented in the description
AI Compliance
Note
Check the one that best describes your usage, or leave all unchecked if AI was not significantly used.
-
AI Assisted Code
Mainly written by a human; AI used for autocomplete or partial generation under full human supervision. -
AI Generated Code
Mainly generated by AI, reviewed and approved by a human before this MR was created. -
Vibe Coded
Generated by AI and only functionally reviewed before this MR was created.
Closes #3586585