\n characters in setText()

I have an instance of Run node and want to replace it’s text by using setText():
Run run = …
String str = …

run.setText(str);

This works fine, unless text contains \n characters. How can I replace text of Run node and make \n characters work the same way they work for plain text?

Hi

Thanks for your request. I think, you can try replacing \n character in the string with com.aspose.words.ControlChar.LINE_BREAK.
Best regards,