4.7.1 :: Text Formatting

Wapple Text Formatting (WTF)


Wapple Text Formatting is a mini markup language designed to allow you to easily format sections of text elements on your page.

The language uses tags in the form of [b]some text[/b], and [color=red]some more text[/color], and can be used anywhere that text is required in an element.

IMPORTANT: To use Wapple Text Formatting you need to set the 'make_safe' attribute to 1 in the <chars> element.

Quick Example


  1.  <?xml version="1.0" encoding="UTF-8" ?>
  2.  <wapl xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://wapl.wapple.net/wapl.xsd">
  3.   <layout>
  4.   <row>
  5.   <cell>
  6.   <chars make_safe="1">
  7.   <value>
  8.   [url=http://wapl.info]WAPL[/url] is [b]so[/b] [size=4]amazing[/size], because [color=red]you[/color] don't have to [s]rewrite[/s] your logic to [span=easy]mobilize[/span] your [u]website[/u].
  9.   </value>
  10.   </chars>
  11.   </cell>
  12.   </row>
  13.   </layout>
  14.  </wapl>


Available Tags


This table details the tags that are available in WTF.

TagParameterUsage
[b]text[/b]NoneMakes the containing text bold
[i]text[/i]NoneMakes the containing text italic
[u]text[/u]NoneUnderlines the containing text
[p]text[/p]NonePuts the containing text into a paragraph
[quote]text[/quote]NonePuts the containing text into a quote tag
[s]text[/s]NoneStrikes through the containing text.
[list]
[*]Bullet 1[/*]
[*]Bullet 2[/*]
[/list]
NoneCreates an unordered list with the given bullets.
[color=#453245]
text
[/color]
A color in hex format.Colors the containing text with the given color.
[size=2]
text
[/size]
The size of the textResizes the containing text to the given size.
[url=http://example.com]
Click Here
[/url]
A valid urlMakes the containing text into a link to the given url.
[span=red]
text
[/span]
A name for the class to give the span.Surrounds the containing text in a span with the given class.
[h1]Site Header[/h1]Display an h1 tag
[h2]Header[/h2]Display an h2 tag
[h3]Header[/h3]Display an h3 tag
[h4]Header[/h4]Display an h4 tag
[h5]Header[/h5]Display an h5 tag
[h6]Header[/h6]Display an h6 tag
[img=100]http://wapl.info/img/logo.png[/img]Image ScaleDisplay an inline image from an external URL

Contents