Keep them on the same line by using insertText without using insertBlock between.
For instance, when I tried
cursor.insertText("I will try ", textFormat);
cursor.insertText("this for you.", textFormat);
for you, the words all appeared on the same line.
insertBlock inserts a paragraph.