Join the Mozilla’s Test Days event from 9–15 Jan to test the new Firefox address bar on Firefox Beta 135 and get a chance to win Mozilla swag vouchers! 🎁

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

How do I soft wrap text documents by default?

  • 5 trả lời
  • 40 gặp vấn đề này
  • 3 lượt xem
  • Trả lời mới nhất được viết bởi David McRitchie

more options

I use a lot of plain-text (or markdown-formatted) documents on my computer and on my server for storing basic information. When I open those documents in Firefox, though, the lines aren't soft-wrapped. Is there a way to set Firefox to soft wrap simple text files by default?

Update: To clarify: I can see the text files fine, and don't want to open them in a different program. I keep a lot of book notes on my web domain in plain text files, and I'd like to be able to navigate to those files within my browser and read them within my browser. But when I go to domain.com/whatever.txt, Firefox does not soft wrap the lines, so I get paragraphs sitting entirely on one line. I'd like to know if there's anyway to soft wrap the file within Firefox, preferably by default.

I use a lot of plain-text (or markdown-formatted) documents on my computer and on my server for storing basic information. When I open those documents in Firefox, though, the lines aren't soft-wrapped. Is there a way to set Firefox to soft wrap simple text files by default? '''Update:''' To clarify: I can see the text files fine, and don't want to open them in a different program. I keep a lot of book notes on my web domain in plain text files, and I'd like to be able to navigate to those files ''within my browser'' and read them ''within my browser.'' But when I go to domain.com/whatever.txt, Firefox does not soft wrap the lines, so I get paragraphs sitting entirely on one line. I'd like to know if there's anyway to soft wrap the file within Firefox, preferably by default.

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

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

more options

Use View > Page Source to view the file or add the view-source: protocol in front of the link in the location bar.

more options

On documents on my computer I use an external editor, Notepad, so that comes up with View > Page Source and it's keyboard shortcut. While it is wrapped it is not a proportional font. But if I want to see the same list I can use a keyword shortcut. if it's on the web then Ctrl+U works just find with the normal list.

Name: source: View Source for when Notepad Edit is invoked by Ctrl+U for LOCAL files

Location: javascript:location="view-source:"+location
Keyword: source:
Description: view source -- same as in IE (it is a chrome shortcut)
http://www.squarefree.com/2003/08/09/chrome-urls-in-mozilla-and-mozilla-firefox/ (same as viewsource: )
more options

If you want to edit those files you could use notepad++ It's nice but I don't like using it because it is tabbed and I'm afraid I'm going to edit it and then re-edit it with an earlier version later.

Notepad++ | 5.9.2

http://notepad-plus-plus.org/
more options

@dmcritchie:
The OP is on a Mac according to the user agent, so programs for Windows are of no use.

more options

This extension will wrap PRE statements and it will wrap .txt files as well.

Can be toggled from the View menu with WORD wrap within PRE ("Ctrl+Shift+M")

So if it is wanted on all the time it can be left on.