Question

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.

Was it helpful?

Solution 6

I will stick with my original idea of adopting Texy.

None of the products mentioned here actually beats it. I had problem with Texys syntax but it seems to be quite standard and is present in other products too.

It is very lightweith, supports very natural syntax and has great "half" wysiwyg editor Texyla (wiki is in Czech only)

OTHER TIPS

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.

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!

There's always textile. It is widely implemented, and has a few basic similarities with Markdown. However, I have never seen a WYSIWYG editor for Textile.

You might find upflow useful.

If you want WYSIWYG, I'm a big fan of FCKeditor. It converts user input to HTML before submitting the form, not after, but has a nice PHP library for using it, and a PHP connector for handling file uploading/browsing (along with several other languages).

If you want something that can be read as plain-text but output as HTML, I vote for Markdown.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top