A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearrunning showdown.js serverside to conver Markdown to HTML (in PHP) - page 1
User InfoPosts
running showdown.js serverside to conver Markdown to HTML (in PHP)#1
I am trying to implement WMD onto my website and was wondering how would I go about running showdown.js server side to convert markdown to HTML? (in order to store both in the DB)

I am using PHP...any tips would be helpful (never ran any sort of js from php before)

Thanks,
Andrew

posted date: 2009-04-06 21:22:00


Re: running showdown.js serverside to conver Markdown to HTML (in PHP)#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-06 21:22:01


Re: running showdown.js serverside to conver Markdown to HTML (in PHP)#3
If you(re going to run a markdown converter, why run the javascript port? Isn(t that a bit backwards? Markdown was originally designed to run server-side, showdown is a port that allows the conversion to happen in javascript.Here is where you start.

posted date: 2009-04-06 21:31:00


Re: running showdown.js serverside to conver Markdown to HTML (in PHP)#4
WMD handles the client side implementation of your markup. It allows the user to see a rich text version of their input before they submit.Once the user is happy, they send their input to the server using the form. At this point you will use your PHP script to take the input and sanitise it. You will need to remove all the possible XSS exploits and any HTML tags which you do not want to store in your database.

posted date: 2009-04-07 03:17:00


Re: running showdown.js serverside to conver Markdown to HTML (in PHP)#5
because i wouldn't know to how to run the markdown.pl either

posted date: 2009-04-07 07:19:00


Re: running showdown.js serverside to conver Markdown to HTML (in PHP)#6
and markdown has horrible documentation

posted date: 2009-04-07 07:25:00


Re: running showdown.js serverside to conver Markdown to HTML (in PHP)#7
You could use PHP Markdown, which is a port of the Markdown program written by John Gruber.Here is a example of how to use PHP Markdown with your code.include_once "markdown.php";$my_html = Markdown($my_text);

posted date: 2009-04-07 12:15:00


Re: running showdown.js serverside to conver Markdown to HTML (in PHP)#8
The original perl implementation is only one of many server-side implementations that exist. @stukelly pointed out a PHP port.

posted date: 2009-04-08 17:47:00


Re: running showdown.js serverside to conver Markdown to HTML (in PHP)#9
The issue is that using Markdown.js on the client side and running and different parser server side will produce inconsistent results given the engines will have subtle differences!

posted date: 2011-01-04 17:45:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.