Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text-to-HTML converter for PHP

What text to HTML converter for PHP would you recommend?

One of the examples would be Markdown, which is used here at SO. User just types some text into the text-box with some natural formatting: enters at the end of line, empty line at the end of paragraph, asterisk delimited bold text, etc. And this syntax is converted to HTML tags.

The simplicity is the main feature we are looking for, there does not need to be a lot of possibilities but those basic that are there should be very intuitive (automatic URL conversion to link, emoticons, paragraphs).

A big plus would be if there is WYSIWYG editor for it. Half-wysiwig just like here at SO would be even better.

Extra points would be if it would fit with Zend Framework well.

like image 340
Josef Sábl Avatar asked Aug 03 '26 11:08

Josef Sábl


2 Answers

Take your pick at http://en.wikipedia.org/wiki/Lightweight_markup_language.

As for Markdown, there's one PHP parser that I've been using called PHP Markdown, and I especially like the Extra extension.

I have actually taken a stab at extending it with my own (undocumented) features. It's available at GitHub (remember that it's the extra branch I've fixed, not the masteR), if you're interested. I've intended on making it a 'proper fork' for a while, but that's another, largely offtopic, story.

like image 135
Henrik Paul Avatar answered Aug 08 '26 22:08

Henrik Paul


The Zend Framework has a WYSIWYG editor bundled with it's Dojo integration.

http://framework.zend.com/manual/en/zend.dojo.form.html#zend.dojo.form.elements.editor

... Bring on the extra points!

like image 33
Kieran Hall Avatar answered Aug 08 '26 23:08

Kieran Hall



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!