It's impossible.
To make the font textarea, but not the cursor, transparent with color:#000;-webkit-text-fill-color:transparent , then create a basic 100% overlap div , the contents of which textarea will be copied + formatted into the textarea oninput event.
You will need to address (or avoid) some problems arising from the synchronization of these two elements, such as scrolling, but this can be done. I made my own HTML editor this way.
AFAIK, the css -webkit-text-fil-color property is supported in Opera, Chrome and should be in Firefox v.48 coming soon.
Martin
source share