Toolbar button to reformat textarea

I’m trying to create a toolbar button that will take the current contents of the textarea, scan the text and reformat it, thereby completely replacing the contents with new text.

The API only provides e.addText() and e.selectText() but no way to select and replace.

Am I overlooking something, or is there a more obvious way of achieving this?

3 Likes

Here is my Pull Request to get this working.

2 Likes