You are here: Re: [PHP] Non-trivial task of converting text to HTML « PHP « IT news, forums, messages
Re: [PHP] Non-trivial task of converting text to HTML

Posted by Jochem Maas on 12/08/05 12:03

Roman Ivanov wrote:
> Task:
> Create a script that converts text into HTML with paragraphs.
>
> Problem:
> Input text could use the book notation, as well as the web notation,
> plus it can contain HTML.
>
> ==
> <h1>This is a title</h1>
>
> This is a Book paragraph.
> This is another book paragraph.
> This is yet another book paragraph, but it's not indented with spaces,
> because user wrote it in OpenOffice.
> ==
>
> ==
> This is a web paragraph.
>
> This is another web paragraph.

what is a book paragraph, what is a web paragraph? (exactly)

have you looked at the Tidy extension? in short it kicks ass
at cleaning up junk HTML - possibly a good start.

>
> This is yet another web paragraph, which is indented with spaces for
> some unknown reason.
> ==
>
> Output text should be correctly formatted without using lots of br's and
> &nbsp;'s. Doing so manually is not a problem, I would just use <p> for
> web paragraphs, and <p class="book"> for book paragraphs. However,
> formatting such text with a scrip is very difficult. Does anyone knows a
> good exaple of such script?
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация