tags:

views:

60

answers:

3

I have a textarea where someone can input text. I do not want a wysiwyg editor.

But what would be great:

Strip all tags, but make correct <p> and <br /> if user input has new lines. Additionally convert all urls, with or without http// or parameter to clickable links.

I cannot find a solution.

So you could type into the textarea:

........
This is a paragraph
This ist still in the paragraph

this is a new paragraph www.this-would-be-clickable

new paragraphp `<strong>`this will be shown not bold`</strong>`
........

thankfull for every advice

A: 

Take a look at CKEditor. It may be more than what you need, but still very good. http://ckeditor.com/

srini.venigalla
yes, it is indeed more than what I need. Thats why I do not want an editor
A: 

Another more simplistic alternative is Wymeditor.

Seems to me that Markdown or Textile would get you a long way, though.

But if all you need is the newline/paragraph control and url to link, you could easily build it yourself with some regex.

phobia
I had a look on wymeditor, but I would prefer the regex solution. Maybe someone could help me with it.
A: