question

Robert339 avatar image
0 Votes"
Robert339 asked YuhanDeng-MSFT commented

How may I be able to resolve all paragraph breaks being removed from text posted to websites from my computer?

Hello,

When I paste text from my computer to a website, on some websites all paragraph breaks disappear from the pasted text.

For example text posted to Stack Exchange was unaffected, while text posted to Answerbag is affected.
It mainly seems to occur copying from .doc documents, but it also affects text copied from Wordpad .txt documents, or text copied from Apache Open Office Writer.

I am using a Lenovo G40, 64 bit PC Notebook, with 16 GB of RAM, running Windows 8.1.
I am using the Chrome web browser.
The computer has Avast antivirus, with the Comodo firewall (Comodo antivirus not running).

(If I search Google for this issue, the search results displayed are on how to remove paragraph breaks, rather than my issue of wanting to prevent them from disappearing.)

I hope to hear with a solution to this issue.

Regards,

Robert339


windows-8
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Your question looks fine to me. Did you just type it into this website or did you copy and paste from some other application?

Normally I use notepad or notepad++ and type in my text into those app. Then I copy and paste from there. The text is just simple ASCII characters, and doesn't include any RTF formatting info.

It's probably dependent on the javascript code (or server side asp/php/whatever code) for each web site that would determine how it interprets the data that you pasted.

Try pasting everything into notepad first, and then copy and paste to the site from there.





0 Votes 0 ·

One of the main reasons for copying from my computer and pasting into a website, is because there is no Undo option for the drafting field of most websites. (Why do I prefer to copy and then paste where no Undo option: because most or all the draft text can sometimes become accidently selected, and then overwritten by the next key-stroke; and thus lost.)

Here, however, there is an Undo option, so I drafted the post within the "doc.microsoft.com" drafting field; I did not paste the text in.

You also suggested copying from Notepad but for these purposes Wordpad is so similar it could make no difference - please see my original post.

Thanks.

Robert339

0 Votes 0 ·

Hi,

I would like to check if the issue has been fixed? If yes, please help accept answer, so that others meet a similar issue can find useful information quickly. If you have any other concerns or questions, please feel free to feedback.

Best Regards,
Danny

0 Votes 0 ·

Hi,

I would like to check if the issue has been fixed? If yes, please help accept answer, so that others meet a similar issue can find useful information quickly. If you have any other concerns or questions, please feel free to feedback.

Best Regards,
Danny

0 Votes 0 ·
YuhanDeng-MSFT avatar image
1 Vote"
YuhanDeng-MSFT answered

Hi,
Maybe you can refer to this:
https://wordpress.com/forums/topic/paragraph-breaks-disappear/
Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.

In my opinion this issue is caused by the different types of scripts.
Maybe you can use paragraph tags:
<p>FIRST PARAGRAPH HERE</p>
<p>SECOND PARAGRAPH HERE</p>

Or this after each image/text pair (to prevent unwanted text-wrap):
<div style="clear: both;"></div>

Thanks for your time.
Best regards,
Danny


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MotoX80 avatar image
0 Votes"
MotoX80 answered MotoX80 edited

but for these purposes Wordpad is so similar it could make no difference

But it might make a difference. Windows 10 no longer has a clipboard viewer so I downloaded this free tool.

https://freeclipboardviewer.com/

When I copy from notepad all I get is text.

99907-capture1.jpg





But when I copy from wordpad, formatting info is also stored into the clipboard. Note the additional options in the viewer.


99936-capture.jpg


So if I paste that RTF text in Word or Excel, those programs will retain the copied formatting information.


If I would paste that text into a web page, I really have no idea what I would get. It would (should) depend on what control and javascript or HTML5 formatting that particular web site uses. Maybe it supports RTF, maybe it doesn't. Maybe it gets confused and strips out new line's.

That was why I suggested that you try copying and pasting from notepad to see if that solves your problem. Notepad is going to put plain old text into the clipboard.

It could also be browser dependent, try using Edge or Firefox.


capture1.jpg (36.8 KiB)
capture.jpg (78.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Robert339 avatar image
0 Votes"
Robert339 answered

Hello,

This is a reply to YuhanDeng - MSFT. (There is only the option to "comment" (with very limited number of characters allowed) under his Answer.)

Thanks for those beginning and ending paragraph codes.
I was not really clear whether those codes are typed into the normal text in the word processor document, or inserted in some other special way.

Anyway, this is the text I prepared in .doc format document for copying and pasting, with those codes inserted in the text:

  • Start of copy: - - - -
    <p>“McMahon” was a series of correspondence too vague to be any legally-binding “agreement”. The “McMahon-Hussein Correspondence” made no mention of “Palestine”, which was in 1915 controlled by the Ottomans who themselves made no use of the name “Palestine”:

  • Start of extract: - - - -</p>

<p>“Palestine lay to the southwest of Damascus and was not explicitly mentioned [in the “McMahon-Hussein Correspondence”]. ” </p>

<p>Extract source:
(https://en.wikipedia.org/wiki/Balfour_Declaration)</p>;

<p>- - - - End of extract - - - -</p>

  • End of copy - - - -


This is how the same text then appeared (together with some additional text that I typed into the website's drafting field at the beginning of the text) on Answerbag, at:
https://www.answerbag.com/q_view/3520999
- - - - Start of copy - - - -
Contributor "mushroom" wrote: "Because the Brits promised control of the same land [...]: This type of comment typically asserts the McMahon correspondence as having promised the same land, to the Arabs; it did NOT.“McMahon” was a series of correspondence too vague to be any legally-binding “agreement”. The “McMahon-Hussein Correspondence” made no mention of “Palestine”, which was in 1915 controlled by the Ottomans who themselves made no use of the name “Palestine”: - - - - Start of extract: - - - - “Palestine lay to the southwest of Damascus and was not explicitly mentioned [in the “McMahon-Hussein Correspondence”]. ” Extract source: (https://en.wikipedia.org/wiki/Balfour_Declaration) - - - - End of extract - - - - Contributor "mushroom" also mentioned "Sykes-Picot": This was not a serious of correspondence; it did not promise the land to the Arabs; it divided the wider region between the major powers. For more information on the "Sykes–Picot Agreement" (1916), see: (https://en.wikipedia.org/wiki/Sykes%E2%80%93Picot_Agreement
- - - - End of copy - - - -

Therefore currently, I don't see that those codes work (preserve paragraph breaks), though I note interestingly, that they (the typed-in codes) did not appear on the text posted to the webpage.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Robert339 avatar image
0 Votes"
Robert339 answered

It seems that suddenly there is no "Reply" option under people's answers but only a "Comment" option with limited characters allowed. Also, seem to be allowed to add another answer but which then overwrites my previous answer. Also there is no "Edit" function any more when I have submitted my answer. I have to ask: Is this website supposed to be user friendly or supposed to be an obstacle course?

Hello,

This is a reply to YuhanDeng - MSFT. (There is only the option to "comment" (with very limited number of characters allowed) under his Answer.)

Thanks for those beginning and ending paragraph codes.
I was not really clear whether those codes are typed into the normal text in the word processor document, or inserted in some other special way.

Anyway, this is the text I prepared in .doc format document for copying and pasting, with those codes inserted in the text:

Start of copy: - - - -
<p>“McMahon” was a series of correspondence too vague to be any legally-binding “agreement”. The “McMahon-Hussein Correspondence” made no mention of “Palestine”, which was in 1915 controlled by the Ottomans who themselves made no use of the name “Palestine”:

Start of extract: - - - -</p>

<p>“Palestine lay to the southwest of Damascus and was not explicitly mentioned [in the “McMahon-Hussein Correspondence”]. ” </p>

<p>Extract source:
(https://en.wikipedia.org/wiki/Balfour_Declaration)</p>;;

<p>- - - - End of extract - - - -</p>

End of copy - - - -


This is how the same text then appeared (together with some additional text that I typed into the website's drafting field at the beginning of the text) on Answerbag, at:
https://www.answerbag.com/q_view/3520999
- - - - Start of copy - - - -
Contributor "mushroom" wrote: "Because the Brits promised control of the same land [...]: This type of comment typically asserts the McMahon correspondence as having promised the same land, to the Arabs; it did NOT.“McMahon” was a series of correspondence too vague to be any legally-binding “agreement”. The “McMahon-Hussein Correspondence” made no mention of “Palestine”, which was in 1915 controlled by the Ottomans who themselves made no use of the name “Palestine”: - - - - Start of extract: - - - - “Palestine lay to the southwest of Damascus and was not explicitly mentioned [in the “McMahon-Hussein Correspondence”]. ” Extract source: (https://en.wikipedia.org/wiki/Balfour_Declaration) - - - - End of extract - - - - Contributor "mushroom" also mentioned "Sykes-Picot": This was not a serious of correspondence; it did not promise the land to the Arabs; it divided the wider region between the major powers. For more information on the "Sykes–Picot Agreement" (1916), see: (https://en.wikipedia.org/wiki/Sykes%E2%80%93Picot_Agreement
- - - - End of copy - - - -

Therefore currently, I don't see that those codes work (preserve paragraph breaks), though I note interestingly, that they (the typed-in codes) did not appear on the text posted to the webpage.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MotoX80 avatar image
0 Votes"
MotoX80 answered MotoX80 edited

There is no setting in Windows that says to strip out, or not strip out newline characters when text is pasted from the clipboard into some running application. It is dependent upon the the application to process the data that is in the clipboard. When you paste into notepad, it strips out formatting info like the font name and text size. Notepad does not support that. When you paste into Word or Excel, those applications support Rich Text and understand how the user wishes to format the data.

When you paste text into a web site, most sites will strip out HTML encoding because if they allowed it, any user with access to post a reply could inject javascript onto the host site to potentially do malicious activity on the client machine.

Right click on this page, and "view page source" to look at your comments. Your "<p>" is not being treated as HTML, it's being translated into plain old display characters.

100386-capture.jpg


This is how the same text then appeared (together with some additional text that I typed into the website's drafting field at the beginning of the text) on Answerbag, at:

You need to ask the folks at Answerbag why their web site formats your reply the way that it does. Or as I have already asked, paste the text from notepad and see how the site processes it.







capture.jpg (50.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YuhanDeng-MSFT avatar image
0 Votes"
YuhanDeng-MSFT answered

Hi,
Well, since there’s different sites or apps have their own scripts and rules of these scripts verifies from each other, I would suggest that you contact the vendor for their advice.

Thanks for your understanding.
Best regards,
Danny


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.