Page 1 of 1
Word Wrap and Plain-Text Paste
Posted: 2022-10-15 11:26:57
by hatchmo
Pasting as plain text retains special characters from some web pages.
These special characters prevent proper paragraph wrap.
In the attached example, that character is
Should that be considered part of unformatted text?
Re: Word Wrap and Plain-Text Paste
Posted: 2022-10-15 13:27:19
by xiamenese
Does the "Zap Gremlins" macro not remove them?
Mark
Re: Word Wrap and Plain-Text Paste
Posted: 2022-10-15 15:21:21
by adryan
G'day, Mark, Al et al
No, it doesn't. And I think the reason this thing persists with Al's pasting is that it is a No Break Space (U+00A0) which is treated pretty much like any other character and not part of formatting per se. All occurrences can easily be replaced with ordinary Spaces using Find & Replace (which could then be Macroized).
The character seems to be an increasingly common (and annoying) occurrence in Web pages. It's rarely appropriate, and I think it bespeaks sloppy programming.
Cheers,
Adrian
Re: Word Wrap and Plain-Text Paste
Posted: 2022-10-16 07:35:00
by xiamenese
Thanks Adrian for pointing that out… I failed to pay attention to what \u160 is!
I get a lot of documents sent to me in DOCX format which are also peppered with those No-Break Spaces. I just replace them as I see them, though a quick macro might be useful.
I also replace them ( ) on the website I edit as they seem to get added automatically by the built-in editor in places for which I cannot see any justification.
Mark
Re: Word Wrap and Plain-Text Paste
Posted: 2022-10-17 08:39:58
by martin
Non-breaking spaces can be a nuisance. I can't imagine the intentions behind all the non-breaking spaces in the sample text that was posted. It's out of control!
But non-breaking spaces are also quite useful if deployed intelligently. Especially as they are actual character codes instead of formatting like "nowrap"; that makes them nearly universally supported by all modern apps. They can ensure a noun phrase like a proper name always stays together on the same line, which can be nice for aesthetics.
As Adrian mentioned, you can use Nisus Writer's find to quickly replace them all with normal spaces. If you do this a lot it's a good candidate to be macro-ized.
Re: Word Wrap and Plain-Text Paste
Posted: 2022-10-19 02:07:36
by xiamenese
Absolutely agree, Martin. But why Word and many other editors like JCE (in Joomla) chuck them in all over the place mystifies me.
Mark