I am loading an html string that represents the editor contents from my database. I want to underline/bold specific words in that string:
ex. one two three four five
I've figured out how to apply formatting to these specific words using formatText like below:
editor.formatText(index, length, "bold", 'api');
I'm wondering if there is a way to prevent the applied format from continuing if the cursor is at the end of the formatted word
ex. one two threeeeee four five <- I want to avoid this
Is there a way to implement this? I can't seem to find much related to this and I am not sure implementing a custom Blot would be the right approach