This question is locked. New answers and comments are not allowed.
Hello,
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:
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:
Is there any way to build the HtmlExportSettings so that these span tags are completely removed?
Thanks.
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:
<
span
class=\"s_1F6AEA04\">Another email with a Coupon Code: </
span
><
span
class=\"s_1F6AEA04\">[</
span
><
span
class=\"s_1F6AEA04\">CouponID</
span
><
span
class=\"s_1F6AEA04\">:]</
span
>
I am using the following settings to achieve this:
HtmlExportSettings settings =
new
HtmlExportSettings()
{
ImageExportMode = ImageExportMode.ImageExportingEvent
};
settings.ImageExporting += (s, e) =>
{
count++;
newFileName =
string
.Format(imageFileName, count.ToString(), e.Image.Extension);
newFileNames.Add(newFileName, e.Image.RawData);
e.Src = newFileName;
e.Alt =
"image"
;
};
settings.StylesExportMode = StylesExportMode.Classes;
settings.ExportFontStylesAsTags =
true
;
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?
Thanks.