Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

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

Opening .txt in file editor, not Firefox

  • 3 trả lời
  • 2 gặp vấn đề này
  • 2 lượt xem
  • Trả lời mới nhất được viết bởi cor-el

more options

Hi!

Firefox 91.0.2 on Windows 10.

In the options I have set .txt files to open in Notepad++ (see screenshot). However, this does not work. Clicking a hyperlink to a .txt file still opens it in Firefox.

How can I fix this?

Here is a link to a .txt file for testing: https://www.learningcontainer.com/wp-content/uploads/2020/04/sample-text-file.txt


Possible solutions I found were all on older versions of Firefox and I couldn't get them to work.

Thanks :)

Hi! Firefox 91.0.2 on Windows 10. In the options I have set .txt files to open in Notepad++ (see screenshot). However, this does not work. Clicking a hyperlink to a .txt file still opens it in Firefox. How can I fix this? Here is a link to a .txt file for testing: https://www.learningcontainer.com/wp-content/uploads/2020/04/sample-text-file.txt Possible solutions I found were all on older versions of Firefox and I couldn't get them to work. Thanks :)
Đính kèm ảnh chụp màn hình

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

more options

Perhaps I should have explained my purpose for this, in case it helps, or for possible workarounds.

I have a local website which uses .txt files for saving notes. (They are opened and processed further with Javascript). Firefox on Android opens the txt files in an external editor, where I can easily edit them and save them. But on Windows 10 I have some trouble doing this.

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

more options

I have "always ask" but the file opens in Firefox. Mozilla did something similar with local pdf files but there is a remedy. I can't find one for text files other than downloading the file and opening it with your editor. There may be a bug report, otherwise you can file one. https://bugzilla.mozilla.org/

more options

If the server sends the text file as text/plain then Firefox will open this file in a tab. You can possibly prefix the link with the view-source: protocol.

You can find these prefs on the about:config page to set what external viewer/editor to use.

  • view_source.editor.args
  • view_source.editor.external
  • view_source.editor.path
more options

cor-el said

If the server sends the text file as text/plain then Firefox will open this file in a tab.

Thanks for your reply.

That's what happens. I wonder why this is not configurable like with other file types.


I was able to add "view-source:" to the links but this did not seem to work. (Nor does the entire protocol seem to work. If I use the test link on http://www.javascriptkit.com/javatutors/links3.shtml nothing happens.)

Still you solved most of my problems. Using the about:config settings I am now able to open the txt file in Firefox, then use the "View Source" (Ctrl+U) option to open the txt with Notepad++.

That's a few more clicks than I'd prefer, but for now it's a decent workaround.

Still hoping for a direct solution, though.

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