wood burning stoves
The moose likes HTML, CSS and JavaScript and the fly likes Select some text from textarea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Select some text from textarea" Watch "Select some text from textarea" New topic

Select some text from textarea

pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 323


I need to select only some of the text entered in the textarea.
After selection, I'm making it bold or italics.

What I've written makes the entire text in the textarea bold or italic..

This is the selected lines of code for this particular problem :

Please advise.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 61968

JavaScript Rich Text Editors

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Select some text from textarea