# Rich Text 编辑器在主题中以多种方式破坏空格字符

**URL:** <https://meta.discourse.org/t/rich-text-editor-in-topics-breaks-white-space-characters-in-multiple-ways/381027>\
**Category:** Bug\
**Tags:** composer, markdown, code\
**Created:** [2025年八月30日 20:33 UTC](https://meta.discourse.org/t/rich-text-editor-in-topics-breaks-white-space-characters-in-multiple-ways/381027 "2025-08-30T20:33:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![per1234](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/per1234/32/569645_2.png) [@per1234](https://meta.discourse.org/u/per1234)\
**Post date:** [2025年八月30日 21:00 UTC](https://meta.discourse.org/t/rich-text-editor-in-topics-breaks-white-space-characters-in-multiple-ways/381027/2 "2025-08-30T21:00:17Z")

</div>

> [@rimelek](#):
>
> 文本的每一行都变成了单行代码

这里有一个专门的错误报告：

> [@当对多行选择应用“预格式化文本”格式时，使用了不正确的格式](https://meta.discourse.org/t/inline-formatting-used-when-preformatted-text-formatting-applied-to-multi-line-selection/378678):
>
> 优先级/严重性： 中 平台 操作系统 Windows 11 浏览器 Google Chrome 139.0.7258.67 Discourse dee24bd73b158ba97453f20035eabce430a1abcd 描述： “预格式化文本”有两种样式： 行内：用于散文段落中的非散文内容（例如，“调用 foo 函数”），或单行非散文内容。 块：用于多行非散文内容。 用户在使用编辑器时，可以选择以下两种应用格式的方法之一： 主动：在添加要格式化的内容之前切换格式模式。 被动：先以未格式化的形式添加内容，然后选中该内容并应用格式。bug 在“富文本编辑器”模式下使用编辑器时，当多行被选中并被动应用“预格式化文本”格式时，会应用行内样式。这导致帖子难以阅读，并且非散文内容难以复制（这是共享代码的常见要求）。 可复现步骤： 打开编辑器。 将编辑器模式开关置于“富文本编辑器”位置。 在帖子中添加以下内容： void setup() { // put your setup code here, to run once: } void l…

---

_[View the full topic](https://meta.discourse.org/t/rich-text-editor-in-topics-breaks-white-space-characters-in-multiple-ways/381027)._
