File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 63866

JavaScript Rich Text Editors

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Select some text from textarea
It's not a secret anymore!