none
IE11: Plain Text Documents and Word-Wrapping RRS feed

  • Question

  • I've noticed that IE doesn't word-wrap plain-text documents. Is there a way to make it so?

    Example: http://www.textfiles.com/adventure/adventhint.txt

    Wednesday, January 11, 2017 8:00 AM

All replies

  • Hi,

    After a lot of research and test, I’m afraid we cannot do like that, it seems made by design.

    Thank you for understanding.

    Best Regards,

    Tao


    Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, January 12, 2017 8:10 AM
    Moderator
  • I've noticed that IE doesn't word-wrap plain-text documents. Is there a way to make it so?

    Example: http://www.textfiles.com/adventure/adventhint.txt

    Use right-click View Source which opens it in Notepad.  Then use Notepad's Word Wrap.

    Alternatively, you won't like it but you could also use the Developer Tools to remove the <pre> tag which is doing this.  View Source is the best solution IMO.



    Robert Aldwinckle
    ---

    Friday, January 13, 2017 6:53 PM
    Answerer
  • You can make a bookmarklet in your IE11 Favorites that applies the css style pre{white-space:pre-wrap}.  Then, you can click that bookmarklet when you visit a .txt page.


    Great tip!  Thanks for the education.  But it raised a few questions.  I was imagining that there would be an equivalent attribute on the pre tag which would do this; e.g. <pre white-space="pre-wrap"> but that didn't work.  So then I tried using the Inline style tool to add it and then I found that the real attribute would have to be coded as <pre style="white-space: pre-wrap;">.  I noticed that there could also be pre-line which would not be as useful in this case because it essentially reformats paragraphs, thus losing any implied table information. And then I noticed I had been overlooking the simplest solution of all: just right-click Edit HTML (in the DT DOM Explorer) removes all scrolling and leaves us with just word-wrapping on the long lines.  An additional benefit of using the DT for me would be that its window could be resized without affecting my main IE window (which is currently in Fullscreen mode).


    Robert Aldwinckle
    ---

    Sunday, January 15, 2017 3:33 PM
    Answerer