Firefox: save highlighted text to a local file

Martin Brinkmann
Oct 30, 2012
Updated • Aug 28, 2013
Firefox, Firefox add-ons
|
18

If you want to preserve information that you have come across on the Internet you have multiple options to do just that. You can save the web page in various formats including as a HTML file, copy the contents that you are interested in to the clipboard and from there to a document on your computer, or bookmark the page. All of the methods have their distinct advantages and disadvantages. Bookmarking may be the quickest option but it does not guarantee that the information will still be available when you access the web page in the future.

Highlighted Text To File is a Firefox add-on that to save highlighted textual contents in the web browser to a text file on the local system. To do that, simply highlight text that you want to save on a web page, right-click afterwards on the page, and select the Save text to file option from the context menu. A preferences window is displayed the first time you use the feature.

Here you can make the following modifications to the output:

  • Configure the output file name including a prefix and whether the date or time should be added to the file name automatically.
  • Configure the directory the file will be saved in.  The default directory if left blank is the user profile folder of the Firefox installation.
  • Whether date, time, url or a separator are written to the file as well.
  • Whether you want to create a new file every time you save text, or append contents to one existing file.

save highlighted text

You can bypass the preferences window if you uncheck the "open preferences dialog when Save Text To File is clicked" option in the dialog  which speeds up the saving of the text. When you save text, a notification is displayed at the top of the browser window to inform you about it. The text is encoded in UTF-8 format to ensure that international characters are saved correctly.

The extension can be quite useful if you regularly save text to files when you are browsing the Internet. The option to bypass the preferences window makes this one of the fastest options to save highlighted text to a local file.

Update: The add-on has been renamed. It is now called Save Text to File.

Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. rpwheeler said on August 28, 2013 at 11:54 pm
    Reply

    Alas, it seems that this doesn’t work for unicode text, and most of texts I want to save are unicode.

    1. bobbyrne01 said on September 4, 2013 at 2:34 am
      Reply

      Unicode characters are now supported in v2.0.1, please update:
      https://addons.mozilla.org/en-US/firefox/addon/save-text-to-file/

  2. bobbyrne01 said on December 3, 2012 at 1:03 pm
    Reply

    Hey Martin
    Appreciate the blog entry for the addon!!
    Could you please update the URL for this addon in the description as I’ve changed the name and location from ‘Highlighted Text to File’ -> ‘Save Text to File’
    Heres the new URL ..
    https://addons.mozilla.org/en-US/firefox/addon/save-text-to-file/

    1. Martin Brinkmann said on December 3, 2012 at 4:23 pm
      Reply

      Thanks for letting me know. Edit done.

  3. Frank D said on November 1, 2012 at 8:47 pm
    Reply

    After much Googling and trying (and failing) to find a single addon or program that would “do it all” I can only suggest using the following work-around. After using the “Highlighted Text to File” addon and thereby creating the plain text file as described above, use the Firefox “Multi Links” addon to highlight all of the same text and then paste the results, which will contain all of the text of the links *with links* into the same file, at the end. Then you will have it all, with the expenditure of about twice the work.

    I hope there will be more suggested addons or programs or workarounds as a result of this article that will do it all in one go-around. That would be a truly valuable item.

  4. Frank D said on October 31, 2012 at 11:11 pm
    Reply

    We may have a difference in terms. Here is an example of how the app saves links in the text file:
    —————————————————
    Date stamp:31-10-2012
    Time stamp:17-8-32
    https://www.ghacks.net/2012/10/30/firefox-save-highlighted-text-to-a-local-file/#comment-1599066

    Author: Martin Brinkmann, Tuesday October 30, 2012 –
    Tags:Firefox, firefox add-ons, text
    Categories: Browsing, Firefox
    You are here: Home » Browsing » Firefox: save highlighted text to a local file
    Previous Post: Mozilla wants to make bookmarks more usable

    Next Post: The Windows 8 Kindle Application

    Note that the URLs behind the links is lost. So there isn’t much point in having the links in the text file, since they can’t be used to find the referenced websites.

    1. Martin Brinkmann said on October 31, 2012 at 11:24 pm
      Reply

      I’m still not sure what you are referring to. The url is this, https://www.ghacks.net/2012/10/30/firefox-save-highlighted-text-to-a-local-file/#comment-1599066, right?

      Do you mean the tag or category urls?

      1. Frank D said on November 1, 2012 at 3:34 am
        Reply

        I mean the items that were links (blue text, underlined) in the original webpage are now lost and can’t be clicked on to activate them, and the underlying URL (http://etc.) is gone, so there’s no possibility of following up on the linked websites or materials.

      2. Martin Brinkmann said on November 1, 2012 at 9:30 am
        Reply

        Ah Frank, now I understand. That’s unfortunately correct. The add-on only copies plain text.

  5. Frank D said on October 31, 2012 at 10:01 pm
    Reply

    I’ve installed it (FF 15.01) but when I select text, there is no icon in either the bar at the top or in the status bar, and there is no “Highlighted text to file” option in the Tools or right-click menu, so there’s no way to save the highlighted text. What am I doing wrong?

    1. Frank D said on October 31, 2012 at 10:03 pm
      Reply

      OK, I now found the option in the right-click menu as “Save text to file.” Thanks anyway.

      1. Frank D said on October 31, 2012 at 10:08 pm
        Reply

        It’s a nice app. I wish it would preserve the URLs in the links that it saves as text.

      2. Martin Brinkmann said on October 31, 2012 at 10:46 pm
        Reply

        It is saving the url in the the text file by default.

  6. mage said on October 31, 2012 at 6:36 pm
    Reply

    Is there an addon like this that saves the formatting of the selected text when it saves it to a file?

    1. Martin Brinkmann said on October 31, 2012 at 7:35 pm
      Reply

      I’m not aware of any add-ons that can do that. Can anyone else chime in?

      1. Ken Saunders said on November 1, 2012 at 8:53 am
        Reply

        I don’t know of any add-ons either, but, you can highlight text > right click > View Selection Source, copy and save that.
        It isn’t the quickest solution, but it does work.

        Example:
        Highlighted Text To File is a Firefox add-on that to save highlighted textual contents in the web browser to a text file on the local system.

        There are several note type taking extensions. I’ve gone through a bunch of them over the years but now I’ve settled with QuickFox Notes.
        https://addons.mozilla.org/en-US/firefox/addon/quickfox-notes/?src=search

        It has many great features, some add-ons available for it, helpful export functions, can be opened/pinned in a tab, and currently has 32K+ users.

  7. Crodol said on October 31, 2012 at 12:28 am
    Reply

    I was looking for something like this and I always struggled a bit with the ScrapBook add-on. Thanks Martin!

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.