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?