or there should be an optional parameter "bool AcceptNewlines" or "bool IgnoreNewlines"
Currently, this can be implemented like this:
private void InsertTextWithNewlines(Block block, string text)
{
string[] lines = text.Split(new[] {"\r\n", "\r", "\n"}, StringSplitOptions.None);
for (int i = 0; i < lines.Length; i++)
{
block.InsertText(lines[i]);
if (i < lines.Length - 1)
{
block.InsertLineBreak();
}
}
}