Hi
Im evaluating your product and there is only one thing stopping us going ahead at the moment, i have implemented search and replace but when i wish to insert html into the exact point that i find my tag, it either inserts at the beginning of the paragraph or end, and feeding html into the Replacement only renders the html as text…
i am using
// Replace tags matches
doc.Range.Replace(new System.Text.RegularExpressions.Regex(CurlyBracketsTagExpression),
new Aspose.Words.ReplaceEvaluator(EvaluateReplaceTags), false);
then
private ReplaceAction EvaluateReplaceTags(object sender, ReplaceEvaluatorArgs e)
{
Paragraph para = (Paragraph)e.MatchNode.ParentNode;
DocumentBuilder b = new DocumentBuilder(para.Document);
b.MoveTo(e.MatchNode);
b.InsertHtml("<b>Test</b>");
e.Replacement = String.Empty;
return ReplaceAction.Replace;
}
When is put in a line like : This is a {tag:test} and another tag {tag:test2} i get this problem.
How do you insert at the required offset within a node, ie (MatchOffset) ?
if i do doc.MoveTo(e.MatchNode) the insertHtml it goes at the front, not at the offset i require…?