how do text inputs work for websites like codepen, codecademy, and google docs? : <p>They are editable and yet have custom highlighting. </p>

<p>They aren't using textarea. They are obviously putting elements in place where it should have been the text. Is there guide that builds something like that and show how you figure out where the cursor would go and so on.</p>

<p>beside reddit very few popular site actually use default html textarea element.</p>

<p>most have custom highlighting and all sorts of things going on, for which they generate html which gives appearance you're editing directly, yet it's javascript mimicking textarea/text input.</p>
