# 仅采用 Markdown 编辑器中的等宽字体

**URL:** <https://meta.discourse.org/t/monospace-font-in-the-markdown-only-editor/359936>\
**Category:** Announcements\
**Tags:** composer\
**Created:** [2025年四月1日 03:49 UTC](https://meta.discourse.org/t/monospace-font-in-the-markdown-only-editor/359936 "2025-04-01T03:49:49Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2025年四月2日 04:34 UTC](https://meta.discourse.org/t/monospace-font-in-the-markdown-only-editor/359936/14 "2025-04-02T04:34:38Z")

</div>

> <https://github.com/discourse/discourse/pull/32122>
>
> This change forces consistency around code font in Discourse once the new
> rich-…editor is enabled
> 
> \- This means all code blocks in Discourse will render with this font
> \- Additionally the markdown mode composer will render with this font
> 
> Additionally we make 3 small adjustments:
> 
> 1. We disable ligatures which conflict with typographer
> 2. We add support for custom ligature settings
> 3. We adjust down font size, cause 14px ends up matching visually with a 16px non monospace font, this change is already in place previously on posts
> 
> Example:
> 
> !\[image\](https://github.com/user-attachments/assets/eca0b544-f3a4-4172-b2af-b39a3c0208e7)

这应该很快就会上线，我正在完成 PR 的审查。

您提供的那些截图将得到解决 @Alteras

> [@Arkshine](#):
>
> 另外，既然内容被视为代码，突出显示它会很有意义。

这很棘手，我并不反对，但这将是一个相当大的改变。

我们现在在 TEXTAREA 中渲染 markdown，要实现那种花哨的语法高亮，我们需要将其切换为使用 Ace（我们有）或 CodeMirror（我们没有）或自定义 ProseMirror 设置（这将非常复杂）。

我个人喜欢语法高亮的 markdown，但我认为这方面的支线任务会让我们所有人从富文本编辑器取得的进展中分心。

---

_[View the full topic](https://meta.discourse.org/t/monospace-font-in-the-markdown-only-editor/359936)._
