473,659 Members | 2,920 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8449
"mrby" <bi******@msn.c om> wrote in message news:<c8******* ***@mail.cn99.c om>...
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+wi ki>

--
| 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.c om> wrote in message news:<c8******* ***@mail.cn99.c om>...
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+wi ki>


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_BBCodePars er 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.c om> wrote in message news:<c8******* ***@mail.cn99.c om>...
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_BBCodePars er 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
25928
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 well as
4
2037
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. something like <!-- !Headline some __bold__ text in a paragraph * a list
5
18003
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 function and have JS put this into an array. Then JS would use this array to create a selection list which displays only the names of the drugs. When the user selections one of the drugs, another selection list will be loaded with the avaiable...
4
5364
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 calculate days, months, and years. This is not for a college course. It's for my own personal genealogy website. I'm stumped about the code. I'm working on it but not making much progress. Is there any free code available anywhere? I know it...
3
7764
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 DB and display it onscreen. No matter which way I open the file, convert it to Unicode/leave it as is or what ever, I see all single bytes ok, but double bytes become 2 seperate single bytes. Surely there is an easy way to convert these mixed...
1
1653
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 delimiter file. Thanks in advance for your help! Amit
1
2247
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 me</h1> <ul>
2
4767
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 help me to write code for that in c# with libraries? regards, Suji.
5
3351
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 project.......... plz help me.. thanks & regards Prabhat
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8335
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8528
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6179
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.