David David - 1 year ago 104
CSS Question

Is it possible to have several different textcolors in one textarea?

I'd like several words / phases in a textarea to appear in different colors... How would I go about doing this? Below is an example, I'd like the word green to appear green etc etc...

<textarea style="width: 100%; height: 100%; resize: none;">
Is it possible to have multiple colors in a textarea?
How would i set certain phases or words to be different colors?

Answer Source

You can't do this inside a <textarea>, not one that's editable. It sounds like you're after a WYSIWYG editor, most of which use a <iframe> to do this.

There are several JavaScript options for this, to name a few:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download