First I want to mention that multiline field result should be supported out of the box, however the current implementation has bug in it, namely this one:
Mail merge doesn't respect new lines from mail merge source
If you are manually replacing merge fields with their result, RadDocumentEditor won't help, as it's purpose is to do more high-level interactions. Instead you could use directly the document model
to remove the field inlines and replace them with the result. For example, the following will remove the merge-field-associated inlines for the first merge field.
// this is just an example on how to get the first merge field.
var fieldStart = document.EnumerateChildrenOfType<FieldCharacter>()
.Where(fc => fc.FieldCharacterType == FieldCharacterType.Start && fc.FieldInfo.Field
var fieldEnd = fieldStart.FieldInfo.End;
var parentParagraph = fieldStart.Paragraph;
List<InlineBase> inlinesToRemove =
(!found && inline == fieldStart)
(inline == fieldEnd)
If you want to continue our conversation further, I would suggest you to open a dedicated support thread for RadWordsProcessing or continue in the RadWordsProcessing forum
, as this forum is dedicated to RadRichTextBox.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items