[MX] working with input TEXT

hi people!

What I have : A multiple line input text box. Somethings
written in it.

What I want: Use the text as if USER using Microsoft WORD
FOR EX: this page. if I choose some text and
press b to make it bold …
Problems: I cant edit a specific part of text. Which is
chosen by user (mouse) (instant change I mean).

Please help!