Ticket T295749
Visible to All Users
Duplicate

ASPxHtmlEditor - The imported document contains large space between paragraphs if a Word document contains unaccepted changes (the Track Changes feature)

created 9 years ago

[DevExpress Support Team: CLONED FROM T293774: Text pasted from MS Word is incorrectly formatted in ASPxHtmlEditor]
Hi.
I'm using the solution ASPxHtmlEditor.Import but not work, not keep formated css.
See attachment.

Comments (2)
Artem (DevExpress Support) 9 years ago

    I've tested this sample and the Import method doesn't produce the previously reported problem (see the attached video).
    Would you please describe what you mean by "not keep formated css"?  If possible, make a screencast illustrating the problem in action (for example, using the Jing Tool for this purpose).

    Thanks,
    Artem

    FS FS
    Felipe Silva 3 9 years ago

      Hi,
      See in attachment has a new swf.

      Answers approved by DevExpress Support

      created 9 years ago

      Hello Felipe,

      Thanks for the clarification. I see these issues. Let me address them sequentially:

      1. ASPxReportViewer loses document styles since they are imported as external CSS classes. Use inline styles to avoid this behavior (see the attached video).
      C#
      HtmlEditor.Import( DevExpress.Web.ASPxHtmlEditor.HtmlEditorImportFormat.Docx, DocumentUrl, true ContentFolder );
      1. Initially, the ASPxHtmlEditor.Import method uses our RichEditDocumentServer component to convert Word content to Html. Currently, it doesn't support the Word Track Changes feature and displays a large space instead of text that was deleted in a document (see the attached screenshots).  You may check this using the following code:
      C#
      RichEditDocumentServer documentServer = new RichEditDocumentServer(); var file = File.Open(Server.MapPath(@"~\Contratos\test.html"), FileMode.Create, FileAccess.ReadWrite); documentServer.LoadDocument(Server.MapPath(DocumentUrl)); documentServer.Options.Export.Html.ExportRootTag = DevExpress.XtraRichEdit.Export.Html.ExportRootTag.Html; documentServer.Options.Export.Html.EmbedImages = true; documentServer.SaveDocument(file, DocumentFormat.Html);

      Our team is going to correct this behavior in the context of the Text changed using the Track Changes feature is lost while loading an OpenXML document into RichEditControl thread. However, they won't fix this for v12.1 since this version is outdated. So, you'll need to upgrade the current version to get a fix.

      Thanks,
      Artem

        Show previous comments (1)
        Artem (DevExpress Support) 9 years ago

          Our ASPxHtmlEditor uses the RichEditDocumentServer component to import a Word document to HTML. Both of these issues aren't supported at this component level. A large white space occurs since the RichEditDocumentServer component doesn't preserve text removed using the Track Changes feature and a background color isn't appeared since it's added using Shading while RichEditDocumentServer supports only regular  background colors. We plan to support this feature but there is no ETA for it.  Currently there is no solution and/or a workaround for these problems.
          Please accept my apologies for not being helpful this time.

          FS FS
          Felipe Silva 3 9 years ago

            Ok Artem, solved.
            But, why I have problem with Margin in top and bottom ?

            Artem (DevExpress Support) 9 years ago

              Thanks for the update. Since this issue isn't related to ASPxHtmlEditor, I've created a new ticket and forwarded it to our XtraReports team:
              ASPxReportViewer - Text is cut off at the bottom on certain pages
              We'll research it and reply you there.

              Thanks,
              Artem

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.