Discuss Add <b></b> tags to selected text in a textarea in the JavaScript Development forum on Dev Shed. Add <b></b> tags to selected text in a textarea JavaScript Development forum discussing JavaScript and DHTML, AJAX, and issues such as coding cross-browser JavaScript.
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month! Download and Activate to enter!
Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.
I would like to create some javascript to do the following - when the user clicks the "BOLD" button, the selected text gets a "<b>" and a "</b>" wrapped around it. Sort of like formatting text on this forum. (For some reason I can't see the vBulletin JS that's accomplishing the similar task)
Posts: 56
Time spent in forums: 3 h 48 m 6 sec
Reputation Power: 10
Thanks, Goran.
Unfortunately I could only get that code to work in IE. It fails in Firefox: 'document.selection' has no properties. I'll plug away a bit and see what I can come up with.
Posts: 56
Time spent in forums: 3 h 48 m 6 sec
Reputation Power: 10
Thanks - you rock.
Still doesn't work in Safari, but Google searches reveal that this is a limitation of Safarai (and Konqueror), which does not provide a programmatic way of inserting a cursor in a textarea.
Posts: 1
Time spent in forums: 4 m 16 sec
Reputation Power: 0
BOLD doesn't appear as bold in textarea
I have been trying to look a wayaround to solve somewhat similar problem, but it seems like bold tag appears in coding and not word doesn't appear to be bold in the textarea. Please tell me does textarea does even support rich formatting??
is there any way around for this problem? how does all those web text editors work out there?
I would like to create some javascript to do the following - when the user clicks the "BOLD" button, the selected text gets a "<b>" and a "</b>" wrapped around it. Sort of like formatting text on this forum. (For some reason I can't see the vBulletin JS that's accomplishing the similar task)