The text style formatting options (bold, italics, underline, strikethrough, inline code) should be activated once their command is pressed. There should be no need to select the text you want to edit, because if you wanted to go out of your way to take your hands off the keyboard and use the mouse to to that you can already use the pop up menu. The purpose of these commands should be to change the style of text your cursor will create preemptively, i.e. before you’ve even written the text that you want to be bolded, italicized, etc. This way you can easily input the command, type whatever you want, input the command again to close off that section from the rest, and you’re done—all without having to lift a finger from the keyboard. The word processors people are most familiar with already work this way, so I think this will help the app act more closely to how people would expect.