I need to make a text editor for my site. Here are a few questions that I have:
- How can I retrieve the row selected in the text area using JavaScript?
- How can I style the first line of the text without styling all rows the same?
Here is an example of what I need:
<textarea>
<span class='center_align'>Hello world</span>
<span class='left_align'>This is a nice paragraph aligned to the left.</span>
</textarea>
I know <textarea>
reads HTML into its input, but how would I go about to style this?