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'] = "
_emphasis_
*strong*
__italic__
**bold**
+ ??citation??
-deleted text-
+inserted text+
+ ^superscript^
~subscript~
%span%
@code@
hn. heading
+ bq. Blockquote
+ fnn. Footnote
+ p. Paragraph
+ bc. Block code
+ pre. Pre-formatted
+
+ # Numeric list
+ * Bulleted list
"linktext":http://...
+"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©
(class) (#id) {style} [language]
+ +> right
+ < left
+ = center
+ <> justify
|_. a|_. table|_. header|
+ |a|table|row|
+ |a|table|row|
!imageurl!
+ !imageurl!:http://...
ABC(Always Be Closing)
+ +See foo[1].
+fn1. Foo.
+==no <b>textile</b>==
+ notextile. no <b>textile
+ here</b>
bq.. quote
+
+ continued quote
+ p. paragraph";
+
+ return $block;
+ }
+}
+
/********************************************************************
* Module Functions
********************************************************************/