Copying hardwrapped text into softwrapped web forms.

Linux for blind general discussion blinux-list at
Tue Nov 3 15:56:33 UTC 2020

Tim here.  The easiest way I've found is to use xsel or xclip to dump
your clipboard contents and reformat with the "fmt" command, giving a
ridiculously large rewrap width:

  $ xsel -ob | fmt -w 99999 | xsel -ib

If you're using the selection buffer (pasted with middle-mouse)
rather than the system clipboard (copied with control+C, pasted with
control+V), you can remove the "b" from both xsel invocations

  $ xsel -o | fmt -w 99999 | xsel -i

I find xsel easier to use, but if you have xclip installed, the
invocation is similar

  $ xclip -o -selection clipboard | fmt -w 99999 | xclip -i -selection clipboard

or for the selection buffer:

  $ xclip -o | fmt -w 99999 | xclip -i

If you have the content in a file, you can use that as the source
instead of the system clipboard:

  $ fmt -w 99999 file.txt | xsel -ib

Hope this gives you some solutions,


On November  3, 2020, Linux for blind general discussion wrote:
> Okay, so this isn't really about accessibility so much as a fringe
> case where what I do for accessibility causes problems for the
> sighted.
> I do all of my writing in the nano text editor in a text-only
> environment and favor hardwarpped plain text files both for my own
> work and for reformatting stuff I download for offline reading.
> If I want to post something I wrote online, it usually means
> switching to a graphical session, opening the text file in Firefox,
> and then copying the hardwrapped text into a text box, and
> generally, the text box and the page produced after submitting the
> form will have softwrapping.
> Generally, this isn't a big deal as long as the resulting page is
> displayed on something with at least 80 characters of width, but it
> can cause choppy, uneven lines on displays that are narrower than 80
> characters, such as a phone screen in portrait mode.
> Anyone know a workaround for this? I'm thinking the ideal solution
> would be a modified copy/cut command that would ignore the single
> linebreaks nano's justify command adds to hardwrap text, but not the
> double line breaks between paragraphs, but I don't know if there
> exists a Firefox extension/about:config option or an Orca function
> to do this.
> _______________________________________________
> Blinux-list mailing list
> Blinux-list at

More information about the Blinux-list mailing list