Index: textile.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/textile/textile.module,v retrieving revision 1.22 diff -u -r1.22 textile.module --- textile.module 13 Oct 2008 21:16:34 -0000 1.22 +++ textile.module 28 Jun 2009 21:24:38 -0000 @@ -363,6 +363,95 @@ } +/** + * Implementation of hook_block(). + */ +function textile_block($op = 'list', $delta = 0, $edit = array()) { + global $user; + + if ($op == 'list') { + $blocks[0]['info'] = t('Textile cheat sheet'); + // Not worth caching. + $blocks[0]['cache'] = BLOCK_NO_CACHE; + $blocks[0]['visibility'] = 1; + $blocks[0]['pages'] = 'node/add/* +node/*/edit +user/*/edit/profile'; + + return $blocks; + } + else if ($op == 'view') { + $block = array(); + $block['subject'] = t('Textile markup'); + $block['content'] = "

Phrase modifiers

+

_emphasis_
*strong*
__italic__
**bold**
+ ??citation??
-deleted text-
+inserted text+
+ ^superscript^
~subscript~
%span%
@code@

+ +

Block modifiers

+

hn. heading
+ bq. Blockquote
+ fnn. Footnote
+ p. Paragraph
+ bc. Block code
+ pre. Pre-formatted
+ + # Numeric list
+ * Bulleted list

+ +

Links

+

"linktext":http://...

+

Punctuation:

+

"quotes" → “quotes”
+ 'quotes' → ‘quotes’
+ it's → it’s
+ em -- dash → em — dash
+ en - dash → en – dash
+ 2 x 4 → 2 × 4
+ foo(tm) → foo™
+ foo(r) → foo®
+ foo(c) → foo©

+ +

Attributes

+

(class) (#id) {style} [language]

+ +

Alignment

+

> right
+ < left
+ = center
+ <> justify

+ +

Tables

+

|_. a|_. table|_. header|
+ |a|table|row|
+ |a|table|row|

+ +

Images

+

!imageurl!
+ !imageurl!:http://...

+ +

Acronyms

+

ABC(Always Be Closing)

+ +

Footnotes

+

See foo[1].

+

fn1. Foo.

+

Raw HTML:

+ +

==no <b>textile</b>==
+ notextile. no <b>textile
+ here</b>

+ +

Extended blocks

+

bq.. quote
+ + continued quote
+ p. paragraph"; + + return $block; + } +} + /******************************************************************** * Module Functions ********************************************************************/