Hello,
I'm trying to understand and find a solution to replace a text in a document.
textTest = textTest.Replace(_if.TextoReplace, _if.NovoTexto); // This finds and replaces the text
// The code below does not find the text to replace
await container.DocumentEditor.Search.FindAllAsync(_if.TextoReplace, FindOption.None);
var searchResults = container.DocumentEditor.Search.SearchResults;
var count = await searchResults.GetLengthAsync();
if (count > 0)
{
await container.DocumentEditor.Editor.InsertTextAsync(_if.NovoTexto);
}
I saw that this happens when I have a "\r" in the text. But even trying to remove "\r" it does not work. And why using pure c# replace it works?
Does anyone has any idea on how to solve this?
Best regards.