Textile - convert text to XHTML

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
BenPollinger
Posts: 2
Joined: Fri Feb 27, 2004 4:40 pm
Contact:

Textile - convert text to XHTML

Post by BenPollinger »

Hello all,

I'd like to see a macro (or similar plugin) to work like Textile:
http://textism.com/tools/textile/?sample=2

Basically, Textile converts simple tags (like BBcode) and produces valid XHTML.

For example, it turns this text:

Code: Select all

* Point one
* Point two
## Step 1
## Step 2
## Step 3
* Point three
** Sub point 1
** Sub point 2
into valid XHTML:

Code: Select all

<ul>
	<li>Point one</li>
		<li>Point two
	<ol>
	<li>Step 1</li>
		<li>Step 2</li>
		<li>Step 3</li>
	</ol>
	</li>
		<li>Point three
	<ul>
	<li>Sub point 1</li>
		<li>Sub point 2</li>
	</ul></li>
	</ul>
At present, it's only available as a script (PHP? JS?) but it should be do-able in TextPad.

Any ideas on how to start?

regards,
Ben
User avatar
gracefool
Posts: 76
Joined: Thu Jan 29, 2004 7:21 am
Location: Wellington, New Zealand
Contact:

Post by gracefool »

This doesn't need to be a built-in feature of Textpad. Just make your own scrupt (in Textpad, if you want) and launch it with a user-defined tool in textpad. Easy.
BenPollinger
Posts: 2
Joined: Fri Feb 27, 2004 4:40 pm
Contact:

Post by BenPollinger »

Hello, thanks for the reply.

I wasn't suggesting it be built in to TextPad - perhaps I put this in the wrong bit of the forum.

Can you point me to any resources for writing scripts to do this sort of thing in TextPad? I know the basis will be several search/replace and regex functions, but not sure how to build it all into one reliable script.

Thanks again,
Ben
www.pollinger.org.uk
www.psyclick.org.uk
Stuff for prospective clinical psychologists
Post Reply