Add support for INCLUDEPICTURE fields. Such fields should work with nested MERGEFIELD, as this is common scenario. Workaround: Manually insert images over specific placeholderRadFlowDocument document =
new
RadFlowDocument();
RadFlowDocumentEditor editor =
new
RadFlowDocumentEditor(document);
editor.InsertText(
"1"
);
editor.InsertText(
"EXAMPLE_IMAGE"
);
editor.InsertText(
"2"
);
foreach
(var run
in
editor.Document.EnumerateChildrenOfType<Run>().ToArray())
{
if
(run.Text ==
"EXAMPLE_IMAGE"
)
{
Paragraph paragraph = run.Paragraph;
int
indexOfCurrentRun = paragraph.Inlines.IndexOf(run);
paragraph.Inlines.RemoveAt(indexOfCurrentRun);
ImageInline imageInline =
new
ImageInline(document);
imageInline.Image.ImageSource = newTelerik.Windows.Documents.Media.ImageSource(imageData,
"png"
);
paragraph.Inlines.Insert(indexOfCurrentRun, imageInline);
}
}