Word paste adding extra lines

Last post 02-23-2006, 3:50 AM by Roland01. 6 replies.
Sort Posts: Previous Next
  •  01-23-2006, 6:16 AM 14997

    Word paste adding extra lines

    When pasting from Word, the editor appears to adds empy lines: <p><span lang="NL"> </span></p>.
    However, in your example editor it does the same (adds &#nbsp;, probably because it's html and not xhtml) but these extra lines do not show in your preview, nor in the normal view.
    How can we prevent these extra lines from being added? They are very annoying to people pasting from word, since they have to be manually removed.
     
    Additional info: I noticed that the extra lines only show when pasting from word and looking at the "normal" view. When I click on preview and go back to normal, they disappear. If I look at HTML and go back to normal the appear again. And when I save they disappear and don't come back. 

    So the extra lines ARE added when pasting Word, but you don't see them always; and they are removed when saving (and don't come back). This remains annoying, do you have any solution?
     
  •  01-23-2006, 11:09 AM 15006 in reply to 14997

    Re: Word paste adding extra lines

    Q1. Which version of CuteEditor are you using?

    Q2. Can you send us a copy of your Word document?

    Q3. When pasting from the Word, have you chooses the cleaning option?

     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  01-26-2006, 10:06 AM 15159 in reply to 15006

    Re: Word paste adding extra lines

  •  02-15-2006, 12:04 PM 15947 in reply to 15159

    Re: Word paste adding extra lines

    Hello,
     
    Anybody there? What's the use of providing a lot of info if nobody responds?
    Maybe too much info, I will summarize below:

    1. I have a Word doc with three lines, nothing else

    First line (nothing in Word doc)
    Second line
    Last line (nothing below in Word doc)

    2. if I paste from Word in the editor the html is as follows

     
    <p>First line (nothing above in Word doc)</p>
    <p>Second line</p>
    <p>Last line (nothing below in Word doc)</p>
     
    3. I don't know where the space comes from, and I don't want <p>. How it should be:
     
    First line (nothing above in Word doc)
    <br/>Second line
    <br/>Last line (nothing below in Word doc.
     
    What should we do!?
     
  •  02-15-2006, 2:38 PM 15966 in reply to 15947

    Re: Word paste adding extra lines

    When pasting the above content into the editor, if you don't choose the cleaning option, you will get the following code:
     
    <h1 style="MARGIN: auto 0cm"><st1:place w:st="on"><st1:city w:st="on"><font face="Times New Roman" color=#000000 size=6>Mission</font></st1:city></st1:place></h1>
    <p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><font face="Times New Roman" size=3>&nbsp;</font></o:p></p>
    <p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size=3>With a market driven approach it is our goal to become a major supplier for display manufacturing equipment based on our proven inline concept. </font></p>


    CuteEditor can clean the above code if you choose the cleaning option:
     
    <h1>Mission</h1>
    <p>&nbsp;</p>
    <p>With a market driven approach it is our goal to become a major supplier for display manufacturing equipment based on our proven inline concept. </p>


    However CuteEditor will not convert the above <P> tag into <br> Tag.
     
    Hope it helps.
     
    Let me know if you have any further  questions.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  02-16-2006, 11:40 AM 16005 in reply to 15966

    Re: Word paste adding extra lines

    Thanks for the response.

    As far as I can see, the problem is caused by the fact that I get a non-breaking space from Word between the H1 and the first paragraph. This causes your editor to add a <p>&nbsp;</p> when cleaning.

    However, Word should not have added this nbsp, since it already puts the paragraph between <p> - which is sufficient.

    I can see that it does make sense to do this when a user had added more lines between the H1 and the paragraph. Then the <p>&nbsp;</P> should be there to cater for the extra line.

    In short, when converting from Word, in a sequence of <p>&nbsp;</p> the editor should always subtract 1 from the total number of pairs to get a correct result. Agree?

    The behaviour I saw when switching between views is probably caused by the fact that the html is corrected by your editor when leaving html view. It then apparently replaces <p>&nbsp;</p> by <p></p>, which is not visible in normal view (html doesn't do anything with such a pair). Correct?

    If you agree with the analysis, can you solve the problem of the "extra" <p>&nbsp;</p>? Or can we do that ourselves somewhere in the configuration?
     
     
  •  02-23-2006, 3:50 AM 16325 in reply to 16005

    Re: Word paste adding extra lines

    Adam, could you please reply? Thanks, Roland
View as RSS news feed in XML