By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,929 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,929 IT Pros & Developers. It's quick & easy.

Html formatting etc.

P: n/a
Hi,

I have a question that maybe someone can help me with?

I have a html textarea. I want to make a menu bar for it. This menu
bar should add <p<i<betc... tags to highlighted text. Plus
closing tags.

I am not the best at javascript and was hopeing someone may be able to
help me?
I have searched but haven't found anything yet. I did find "TinyMCE "
etc but I don't need most of it's functionallity.

Any help would be greatly aprechiated.
Thanks in advance.

Kind Regards,
Mickey

Nov 21 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 21 Nov 2006 13:42:33 -0800, in comp.lang.javascript "Mickey"
<mi************@gmail.com>
<11**********************@m7g2000cwm.googlegroups. comwrote:
>| Hi,
|
| I have a question that maybe someone can help me with?
|
| I have a html textarea. I want to make a menu bar for it. This menu
| bar should add <p<i<betc... tags to highlighted text. Plus
| closing tags.
|
| I am not the best at javascript and was hopeing someone may be able to
| help me?
| I have searched but haven't found anything yet. I did find "TinyMCE "
| etc but I don't need most of it's functionallity.
Have you looked at FCKeditor?
http://www.fckeditor.net/
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Nov 21 '06 #2

P: n/a

Jeff North wrote:
Have you looked at FCKeditor?
http://www.fckeditor.net/
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Thanks for the reply.

Yes, I've seen this, however it's a lot more than I need.
I just basically need to wrap <b></b>'s etc... around selected text.
So a simple button would suffice.

Thanks again for the help.

Nov 21 '06 #3

P: n/a

Mickey wrote:
Jeff North wrote:
Have you looked at FCKeditor?
http://www.fckeditor.net/
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------

Thanks for the reply.

Yes, I've seen this, however it's a lot more than I need.
I just basically need to wrap <b></b>'s etc... around selected text.
So a simple button would suffice.

Thanks again for the help.
In reply to myself, I found this:
http://www.javascriptsearch.com/scri...g_creator.html

This is almost what I need, except, I need to be able to select text
within the text area and for example, click a <Bbutton and have the
highlighted text be surrounded by: <Bhighlighted text </B>..

Any ideas?
Thank you in advance.

Nov 22 '06 #4

P: n/a
Mickey escreveu:
In reply to myself, I found this:
http://www.javascriptsearch.com/scri...g_creator.html

This is almost what I need, except, I need to be able to select text
within the text area and for example, click a <Bbutton and have the
highlighted text be surrounded by: <Bhighlighted text </B>..
Take a look here: <URL:http://jsfromhell.com/forms/selection:]

Getting the caret coordinates and the selected text (when the selection
has just empty blank lines, it returns an empty string...) is
problematic with under IE when using <textarea>'s, I've made some dirty
fixes to get the expected results :(
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com
Nov 22 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.