I am using the Rich Text Editor to construct documents that contain Mail Merge Fields. These documents are then exported as HTML and uploaded to another company that handles the actual mail merge portion or our requirement. All of this used to work as expected until the latest version of the Rich Text editor.
It now appears that the HTML export has change enough that the mail house can no longer perform the required mail merging that we need. The problem lies in embedding style classes or font styles into the document. I need the exported HTML to not include these extra tags. I have investigated the available HtmlExportSettings but haven't yet been able to get the document to come out as I need.
For example this is the closest I have been able to come:
class=\"s_1F6AEA04\">Another email with a Coupon Code: </
The merged field has got to come out as [CouponID:], however each component of that code is wrapped in a span. I have a hunch that it would be fine if the entire field was wrapped in a span, but I can't have it broken up as it is above.
I am using the following settings to achieve this:
HtmlExportSettings settings =
ImageExportMode = ImageExportMode.ImageExportingEvent
settings.ImageExporting += (s, e) =>
.Format(imageFileName, count.ToString(), e.Image.Extension);
e.Src = newFileName;
settings.StylesExportMode = StylesExportMode.Classes;
settings.DocumentExportLevel = DocumentExportLevel.Document;
settings.StyleRepositoryExportMode = StyleRepositoryExportMode.DontExportStyles;
exporter.ExportSettings = settings;
Is there any way to build the HtmlExportSettings so that these span tags are completely removed?