We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Replace string by many paragraphs

Hi, I have to replace string like this “[Put content here]” by list of paragraphs. How can I do it? Is FindAndReplace a suitable method?

Hi there,

Thanks for your inquiry. Please refer to the following article:
Find and Replace

In your case, we suggest you following solution.

1) Implement IReplacingCallback interface and use Range.Replace method to find the text "[Put content here]"
2) In IReplacingCallback.Replacing, create an instance of DocumentBuilder class.
3) Move the cursor to the matched node.
4) Insert the content according to your requirements.

Hope this helps you. Please let us know if you have any more queries.