It seems the text start with ‘\n’ which causes the bug. We can reproduce this issue.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSGRIDJS-757
one more ,
when use this code
xs.sheet.addHighlightTextBox(textbox.id, 1, textbox.text.length);
it cannot cover the last charactor of the text .here the last dot is not covered.
so we raise another issue :
Issue ID(s): CELLSGRIDJS-758
You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.