Where can I find documentation about the editor APIs?

I want to apply styles to text but I couldn’t find the API that handles it.

If your goal is to apply styles to field contents, AFAIK there is no dedicated API for that.

Here is an example of how I went about changing the directionality of selected text in one of my add-ons: