RadEditor Control 通过电子邮件发送技术术语



我在 Web 应用程序中使用 RadEditor 控件 ASP.NET。它主要用于电子邮件正文。用户通常将内容从MS Word复制并粘贴到此控件,并通过此应用程序发送电子邮件。用户使用的是 Chrome Book 中的 Chrome 浏览器。但是用户现在抱怨一个问题。当用户发送电子邮件时,收件人会收到一些技术术语,如下所示以及电子邮件内容。

<qowt-page named-flow="FLOW-1" style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-box-align: stretch; -webkit-box-pack: justify; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; box-shadow: #d1d1d1 0px 0px 0px 1px, #cccccc 0px 0px 4px 1px; overflow: hidden; margin: auto auto 5mm; position: relative; color: #000000; font-family: Calibri, sans-serif; font-size: 16px; width: 595.3pt; height: 841.9pt; cursor: text !important;"> 

我不知道他们收到的这些垃圾是什么。我试图在Windows机器的IE和谷歌浏览器中模拟这个问题,但无法模拟它。只有在Chrome book中使用Google Chrome的用户才会遇到此问题。电子邮件通过 Chrome 图书发送。

我已经尝试了以下代码,但没有结果。 txt内容在这里是RadControl。

txtContent.StripFormattingOptions = EditorStripFormattingOptions.MSWordNoMargins | EditorStripFormattingOptions.ConvertWordLists;
txtContent.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertToXhtml);  

我尝试在Chrome浏览器中启用和禁用Brotli-Content编码,但无法模拟它。

使用txtContent.Content获取发送电子邮件,而无需在电子邮件正文中发送行话。

您可以在以下联机资源中看到如何通过 StripFormattingOptions 属性去除 Word 格式:

https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/managing-content/pasting-content/clean-ms-word-formatting

https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/managing-content/pasting-content/clean-ms-word-formatting-on-page-load-and-on-submit

https://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx

最新更新