Incorrect formatting when pasting from Word

  •  02-01-2013, 11:57 AM

    Incorrect formatting when pasting from Word

    1) Create a basic ASP.Net (I am using .Net 2.0) page containing the editor:

     

     

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="Common_test" %>

    <%@ Register TagPrefix="RTE" Namespace="RTE" Assembly="RichTextEditor" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">

    <title></title>

    </head>

    <body>

    <form id="form1" runat="server">

    <div>

    <RTE:Editor id="Editor1" Text="Type here" runat="server" />

    </div>

    </form>

    </body>

    </html>

     

          2) Open Word (I am using Office 2010).

          3) Choose the "No Spacing" paragraph formatting option.

          4) Enter 2 (or more) lines of text, with carriage returns at the end of the lines.

          5) Copy the text.

          6) Navigate to your ASPX page

          7) Paste. Choose OK to clean the code.

    The pasted text then includes a blank line in between each line of text.

     

    Dan

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems