[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.
We have closed this ticket because another page addresses its subject:
Text changed using the Track Changes feature is lost while loading an OpenXML document into RichEditControlASPxHtmlEditor - The imported document contains large space between paragraphs if a Word document contains unaccepted changes (the Track Changes feature)
Answers approved by DevExpress Support
Hello Felipe,
Thanks for the clarification. I see these issues. Let me address them sequentially:
- 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
);
- 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
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.
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
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
Hi,
See in attachment has a new swf.