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

Robert339 1 Reputation point
2021-05-25T18:39:22.68+00:00

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 for business | Windows Client for IT Pros | User experience | Other
{count} votes

6 answers

Sort by: Most helpful
  1. Anonymous
    2021-05-26T01:48:33.363+00:00

    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.

    1 person found this answer helpful.
    0 comments No comments

  2. MotoX80 36,396 Reputation points
    2021-05-26T15:53:42.757+00:00

    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.

    0 comments No comments

  3. Robert339 1 Reputation point
    2021-05-27T16:52:39.46+00:00

    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.

    0 comments No comments

  4. Robert339 1 Reputation point
    2021-05-27T16:59:11.633+00:00

    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.

    0 comments No comments

  5. MotoX80 36,396 Reputation points
    2021-05-27T23:59:08.493+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.