tags:

views:

54

answers:

5

I want to give users the option to format text like bold, italic, add image etc ...

I want to give list of options as such as given here in stackoverflow while asking questions

Where can i find any predefined scripts for that? I searched on google , but i think i haven't searched with a proper text and i couldn't find anything relevant!!

+2  A: 

Markdown for PHP is located at

Alternatives to Markdown can be found at


Somewhat related is this blog entry about what StackOverflow was built with:

You'll find many more answers about SO on http://meta.stackoverflow.com/

Gordon
+3  A: 

Actually:

Sarfraz
+2  A: 

SO uses the WMD editor, which you can find here. It also uses MarkdownSharp to generate the HTML shown on the page. You'd need to replace this with a PHP version of Markdown -- @Gordon's answer contains a link.

tvanfosson
+1  A: 

What you are after is something to 'parse' the text.

This will be a special function that looks at a string such as **my text** and notices the pair of * before and after the string my text it then converts the first pair into a <b> and the second pair get turned into </b>.

You can either do it in JavaScript or server side code, either before or after you store/read from the data base.

There are lots of library's that other people have been mentioning. But if you wanted to do it your self, that is the basic principle.

thecoshman
A: 

This are all editor. So use any of the editor and customize your input option.

Karthik