473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Convert Wiki format text file to HTML page

Hi,

I see that Wiki's method of editing HTML is rather
simple, for example:
Using *bold* for bold text, and using _itatics_ for
itatic font text.
I wonder if there is available code for this purpose?

Thanks much!
Jul 17 '05 #1
4 8432
"mrby" <bi******@msn.com> wrote in message news:<c8**********@mail.cn99.com>...
Hi,

I see that Wiki's method of editing HTML is rather
simple, for example:
Using *bold* for bold text, and using _itatics_ for
itatic font text.
I wonder if there is available code for this purpose?


Not sure, which Wiki software use such syntax. You may use some
regular expressions for that. Or number of Wiki written in PHP are
available on the net. You may look at the source codes.
<http://www.google.com/search?q=php+wiki>

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #2
In article <ab**************************@posting.google.com >, R. Rajesh Jeba Anbiah wrote:
"mrby" <bi******@msn.com> wrote in message news:<c8**********@mail.cn99.com>...
Hi,

I see that Wiki's method of editing HTML is rather
simple, for example:
Using *bold* for bold text, and using _itatics_ for
itatic font text.
I wonder if there is available code for this purpose?


Not sure, which Wiki software use such syntax. You may use some
regular expressions for that. Or number of Wiki written in PHP are
available on the net. You may look at the source codes.
<http://www.google.com/search?q=php+wiki>


Only using regular expressions for textparsing is usually not a good
idea. First problem you encounter are nested *tags*

Perhaps you could have a look at the HTML_BBCodeParser package
(http://pear.php.net) and rewrite the basic filter to suit your needs?
--
Tim Van Wassenhove <http://home.mysth.be/~timvw/contact.php>
Jul 17 '05 #3
The easies way to do this is to use a wrapper script around txt2tags:

http://txt2tags.sourceforge.net/

copy the txt2tags file into your webroot, in your 'edit mode' submit a
form to it with the correct paarmenters to convert your trivial mark
up into html, in your 'view' mode, include the html.

This is only one simple way.

Cheers.
"mrby" <bi******@msn.com> wrote in message news:<c8**********@mail.cn99.com>...
Hi,

I see that Wiki's method of editing HTML is rather
simple, for example:
Using *bold* for bold text, and using _itatics_ for
itatic font text.
I wonder if there is available code for this purpose?

Thanks much!

Jul 17 '05 #4
>
Only using regular expressions for textparsing is usually not a good
idea. First problem you encounter are nested *tags*

Perhaps you could have a look at the HTML_BBCodeParser package
(http://pear.php.net) and rewrite the basic filter to suit your needs?
--
Tim Van Wassenhove <http://home.mysth.be/~timvw/contact.php>


I found such a package in the same site!
http://pear.php.net/package/Text_Wiki/

It seems exactly what I wanted

Thanks much!
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Robert Zierhofer | last post by:
hi there, it seems as if i can´t convert the euro and pound sign to their html equivalents. i tried eregi_replace("€", "&euro;", $haystack); eregi_replace("£", "&pound;", $haystack); as...
4
by: chris | last post by:
hi, i am looking for a way to structure the text in XML comments to produce a XHTML doc format for the XMLs (in this case XSLT). so is was thinking about using a wiki like text format. e.g....
5
by: Andrew V. Romero | last post by:
At work we have an excel file that contains the list of medications and their corresponding strengths. I would like to save the excel file as a text list and paste this list into a javascript...
4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
3
by: hunterb | last post by:
I have a file which has no BOM and contains mostly single byte chars. There are numerous double byte chars (Japanese) which appear throughout. I need to take the resulting Unicode and store it in a...
1
by: kitkat | last post by:
Is it possible to convert excel file format to csv format through asp dotnet. I need to select a file through browse button that select an excel file and once selected, would convert it into comma...
1
by: Jorge | last post by:
I want to convert this xml to pdf using cocoon <?xml version="1.0" encoding="ISO-8859-1" ?> <document> <header> <title>Pagina</title> </header> <body> <h1>Link dei siti più visitati da...
2
by: suji | last post by:
Hai, Are there any 3rd party controls who provide free libraries to convert my html form to pdf in c#? I need to have a button on my form, that should convert my page to pdf format. Can any one...
5
by: sonu | last post by:
hey good morning ...... how to convert a video file in .flv format in php for linux hosting......is there any package whis provide this facility . Can i use ffmpeg for linux hosting...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.