Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Thunderbird will not wrap preformatted text

  • 2 trả lời
  • 0 gặp vấn đề này
  • 95 lượt xem
  • Trả lời mới nhất được viết bởi Angelos Vassiliou

Issue

Thunderbird fails to wrap long lines of HTML-formatted text that is wrapped in a <pre> tag. This behavior is consistent in both the email viewer when viewing received emails, as well as in the email composer when writing an email containing preformatted text.

What I tried

1. Make all settings of config editor that contain the word wrap as true 2. make a userContent.css stylesheet within the chrome directory within the profile directory.

Question

How do I post the offending HTML code (and the CSS file I tried) on this forum?

How do I force Thunderbird to wrap preformatted text?

Issue Thunderbird fails to wrap long lines of HTML-formatted text that is wrapped in a &lt;pre&gt; tag. This behavior is consistent in both the email viewer when viewing received emails, as well as in the email composer when writing an email containing preformatted text. What I tried 1. Make all settings of config editor that contain the word wrap as true 2. make a userContent.css stylesheet within the chrome directory within the profile directory. Question How do I post the offending HTML code (and the CSS file I tried) on this forum? How do I force Thunderbird to wrap preformatted text?
Đính kèm ảnh chụp màn hình

Được chỉnh sửa bởi Angelos Vassiliou vào

Giải pháp được chọn

The CSS did not apply because I had not enabled toolkit.legacyUserProfileCustomizations.stylesheets

I set the following: toolkit.legacyUserProfileCustomizations.stylesheets = true

And now all <pre> text wraps (at most at 75em).

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (2)

Offending HTML code:


<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body style="word-wrap:break-word" vlink="purple" link="blue" lang="IT">
    <p>test.</p>
    <p>The following text does not wrap:</p>
    <div class="moz-forward-container"><font color="#008000" size="1" face="Verdana"><font size="1" face="Verdana">
          <div style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New" dir="ltr"><font color="#000000" size="1" face="Verdana">
              <div class="WordSection1">
                <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
                <pre><span style="color:blue"><o:p>&nbsp;</o:p></span></pre>
                <pre><span style="color:blue">CAUTION: External email. Do not click links, open attachments or reply unless you recognize the sender and know the content is safe.<o:p></o:p></span></pre>
                <pre><span style="color:blue">ATTENZIONE: Questa e-mail proviene da un dominio esterno al perimetro Leonardo. Non cliccare su collegamenti, aprire allegati o rispondere a meno che non si riconosca il mittente e si sappia che il contenuto e' sicuro.<o:p></o:p></span></pre>
                <pre><span style="color:blue"><o:p>&nbsp;</o:p></span></pre>
                <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
              </div>
            </font></div>
          <blockquote style="MARGIN-RIGHT: 0px" dir="ltr">
            <div style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New">&nbsp;</div>
          </blockquote>
          <div style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New">&nbsp;</div>
        </font></font>
      <blockquote></blockquote>
      <blockquote></blockquote>
      <blockquote></blockquote>
    </div>
  </body>
</html>

Contents of userContents.css:

pre {
    max-width: 75em;
    white-space: pre-wrap;
}

Giải pháp được chọn

The CSS did not apply because I had not enabled toolkit.legacyUserProfileCustomizations.stylesheets

I set the following: toolkit.legacyUserProfileCustomizations.stylesheets = true

And now all <pre> text wraps (at most at 75em).

Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.