The JTextile demo can now be seen on http://philwilson.org/jtextile so that people don't need to open ports on their firewall as well as still being on the original http://philwilson.org:8180/jtextile. It's also a much cleaner URL.
JTextile 1.1 was release in mid-2004 (I think). This is just a catch-up post :)
JTextile is a Java implementation of Dean Allen's Textile, a “humane web text generator”. It uses the GNU regular expression library.
JTextile was written by Gareth Simpson after prompting by me. We both patch it when necessary.
It is released under the same liberal open source license as the original Textile.
Currently JTextile does not support all of the original Textile syntax. The most obvious omission is support for tables:
USING TEXTILE
Block modifier syntax:
Header: hn.
Paragraphs beginning with 'hn. ' (where n is 1-6) are wrapped in header tags.
Example: <h1>Text</h1>
Header with CSS class: hn(class).
Paragraphs beginning with 'hn(class). ' receive a CSS class attribute.
Example: <h1 class="class">Text</h1>
Paragraph: p. (applied by default)
Paragraphs beginning with 'p. ' are wrapped in paragraph tags.
Example: <p>Text</p>
Paragraph with CSS class: p(class).
Paragraphs beginning with 'p(class). ' receive a CSS class attribute.
Example: <p class="class">Text</p>
Blockquote: bq.
Paragraphs beginning with 'bq. ' are wrapped in block quote tags.
Example: <blockquote>Text</blockquote>
Blockquote with citation: bq(citeurl).
Paragraphs beginning with 'bq(citeurl). ' recieve a citation attribute.
Example: <blockquote cite="citeurl">Text</blockquote>
Numeric list: #
Consecutive paragraphs beginning with # are wrapped in ordered list tags.
Example: <ol><li>ordered list</li></ol>
Bulleted list: *
Consecutive paragraphs beginning with * are wrapped in unordered list tags.
Example: <ul><li>unordered list</li></ul>
Phrase modifier syntax:
_emphasis_ <em>emphasis</em>
__italic__ <i>italic</i>
*strong* <strong>strong</strong>
**bold** <b>bold</b>
??citation?? <cite>citation</cite>
-deleted text- <del>deleted</del>
+inserted text+ <ins>inserted</ins>
^superscript^ <sup>superscript</sup>
~subscript~ <sub>subscript</sub>
@code@ <code>computer code</code>
==notextile== leave text alone (do not format)
"linktext":url <a href="url">linktext</a>
"linktext(title)":url <a href="url" title="title">linktext</a>
!imageurl! <img src="imageurl">
!imageurl(alt text)! <img src="imageurl" alt="alt text" />
!imageurl!:linkurl <a href="linkurl"><img src="imageurl" /></a>
ABC(Always Be Closing) <acronym title="Always Be Closing">ABC</acronym>
In addition it:
- from "what does it do?" on the Textile homepage
- Replace single and double primes (' and ") used as quotation marks with HTML entities for opening and closing quotation marks (‘’ and “”) in readable text, while leaving untouched the primes required within HTML tags.
- Replaced double hyphens (--) with an em-dash (—) entity.
- Replace single hyphens surrounded by spaces with an en-dash (–) entity.
- Replace triplets of periods (...) with an ellipsis (…) entity.
- Convert many nonstandard characters (Ÿúߊ?Œ) to browser-safe entities corresponding to keyboard input.
- Apply block- and phrase-level structural tags automatically and at the discretion of the writer via quick tags.
- Create hyperpnks and insert images via quick tags.
- Define acronyms via quick tags
- Wrap an <acronym> tag around runs of three or more capital letters automatically.
- Convert (TM), (R), and (C) to ™, ®, and ©
- Convert the letter x to a dimension sign: 2x4 to 2×4 and 8 x 10 to 8×10
bq(URL). text (phil 09/07/2003)Subscribe to Posts [Atom]