There are numbers of built in text editors are provided by yahoo, amazon, google etc It's not a big deal you just need to copy and paste the scripts.
Like here in this forum you can see the stackoverflow text editor that is an open source text editor. You can use the CDN also no need to copy and past the scripts in your ui code.