• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hyperlinks in text area

 
Vani Bandargal
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We want to show some hyper links in the text area (which is basically user comment area in the application).
User should be able to click on that link which is inside the text area.

Any suggestions on this.

Thank you
 
Paul Clapham
Sheriff
Posts: 21155
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Vani", please check your private messages for an important administrative matter.
 
Vani Bandargal
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have learned from googling that html text area do not recognize hyperlinks.
I am using stuts html:textarea in my code which eventually render the regular html text area to the browser.
Is this correct to use ruch text area for this ?
Please correct me if I am correct.
[ October 10, 2008: Message edited by: Vani Bandargal ]
 
Joe Ess
Bartender
Posts: 9302
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you want your users to be editing HTML source, use a rich text editor like FCKeditor instead of a plain text editor like textarea.
 
Vani Bandargal
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Joe Ess.

I just learned from the url mentioned below that FCKeditor is the solution.
I came back to this website and you confirmed it too. I am glad that I am heading in right direction.
http://www.oreillynet.com/onjava/blog/2006/02/integrating_a_richtext_widget.html

I do have few more questions on this.
1. I downloaded the FCKeditor 2.6.3 and not the FCKeditor.Java. Is this correct?
2. Is this OK only to copy the js file to my project or do I need to copy all the files available in that zip on to my project?
 
Joe Ess
Bartender
Posts: 9302
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No idea. I just know that's what pebble uses.
 
Vani Bandargal
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved my problem using TinyMCE

I could have done the same using FCKEditor too and felt that TinyMCE is easier to integrate.

Basically I needed to achieve 2 things in our text area
1. Allow some basic formatting features(like bold, underline...)
2. Render a Clickabale links.

#1 is resolved since with TinyMCE, the normal text area we had before is now a rich text area whih allows all formatting.
#2 is not completely resolved but still OK with some work around
It is not possible to have clickable links directly in any editor(rich text editor) be it be using FCKeditor or TinyMCE or some other tool.
One has to hold Ctl key + click in order for a link to work.

Other way for clickable links would be through preview option available in rich text editor. We are OK with this now

[ October 15, 2008: Message edited by: Vani Bandargal ]

[ October 15, 2008: Message edited by: Vani Bandargal ]
[ October 15, 2008: Message edited by: Vani Bandargal ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic