As has been hinted at but not explicitly mentioned (unless I missed it) ....
Wordstar served as a text editor as well as a word processor on CP/M. It was a far sight better word processor than the PerfectWriter that came with my 1st computer (Kaypro II running CP/M) unless (as one of my consulting clients was) you were publishing an academic book.
PW supported much larger documents (Virtual Memory was not a forte of CP/M and actual RAM maxed out at 64K) as well as endnotes / footnotes. Even indexing, as I recall. For most documents I'd write Wordstar was more than sufficient and quite snappy, thank you, once I upgraded to a Kaypro 10 with a hard drive, so the 5.25" diskette didn't spin constantly fetching something or other. Sure, WordPerfect was much more WYSIWYG and an all around a better word processor once MS/PC-DOS came around and we had 16 bits (well sort of; with 8-bit addressable RAM segments) and yes -- arguably better than Word is today, and certainly not any slower. It also had a mode which displayed the embedded formatting codes with the toggle of an F-key; something I still miss trying to figure out why Word wants to indent something, or won't let me do so, or whatever.
Yes, as a text editor it was no vi (which BTW I still use to this day when I don't need something language-aware like VS code or a Java IDE) but for CP/M it worked fine -- as long as you remembered to put it in plain text ("Document"?) mode [and yes, I too got irritated when I didn't...], but I don't think CP/M came with a full-screen editor so short of writing your own we used what we had.
When I did get to use vi BTW, finally getting to use "real computers" running Unix then later Linux, there was a more programmable alternative I was often encouraged to check out, in case I liked it better. I didn't. Anyway, it was a little thing called EMACS and funnily enough, the default key binding on the version I learnt was ... you guessed it: same as Wordstar. (Or maybe same as PW...; it's been awhile) ... Still I have always preferred vi. EMACS was open source though when very little else was so I've hacked on it a few times to allow users to edit text fields in a database, e.g. Ah, the good old days.