Hi!
Sorry for may bad english!
How to add a function that will add some text in textarea, when someone clicks on button, where the cursor is?
(Like here, on daniweb textareas!)
eg. There is bold button! The user clicks on it, and the text "[BOLD][/BOLD]" writes where curser/caret is. Cursor/caret (|) is focused between these two elements "[BOLD]cursor/caret (|)[/BOLD]"
Thanks!
ivan3510
8
Junior Poster
Recommended Answers
Jump to PostYou are looking for is a functionality in WYSIWYG editor. You may search for window.getSelection() for FF or others, and document.selection.createRange() for IE.
Jump to PostIf browser doesn't support this, then will be redirect to some other page. How to do that?
If browser doesn't support this because his version (too old), the will be redirect to some other page. How to that.
(with javascript)If a browser does not support JavaScript, you can't redirect …
All 8 Replies
Taywin
312
Posting Virtuoso
ivan3510
8
Junior Poster
ivan3510
8
Junior Poster
ivan3510
8
Junior Poster
Taywin
312
Posting Virtuoso
ivan3510
8
Junior Poster
Taywin
312
Posting Virtuoso
ivan3510
8
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.