Compose tips

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <blockcode> <ul> <ol> <li> <dl> <dt> <dd>

  • Syntax highlighting of source code can be enabled with the following tags:

    • Generic syntax highlighting tags: "<code>", "<blockcode>".
    • Language specific syntax highlighting tags: "<css>" for CSS source code, "<d5>" for Drupal 5 source code, "<d6>" for Drupal 6 source code, "<html>" for HTML source code, "<js>" for Javascript source code, "<php>" for PHP source code, "<sql>" for SQL source code.
    • PHP source code can also be enclosed in <?php ... ?> or <% ... %>, but additional options like line numbering are not possible here.

    Options and tips:

    • The language for the generic syntax highlighting tags can be specified with one of the attribute(s): type, lang, language. The possible values are: "actionscript" (for ActionScript), "apache" (for Apache Log), "applescript" (for AppleScript), "bash" (for Bash), "c" (for C), "c_mac" (for C (Mac)), "cpp" (for C++), "cpp-qt" (for C++ (QT)), "csharp" (for C#), "css" (for CSS), "d5" (for Drupal 5), "d6" (for Drupal 6), "diff" (for Diff), "drupal5" (for Drupal 5), "drupal6" (for Drupal 6), "html" (for HTML), "html4strict" (for HTML), "ini" (for INI), "javascript" (for Javascript), "js" (for Javascript), "latex" (for LaTeX), "mysql" (for MySQL), "objc" (for Objective C), "php" (for PHP), "php-brief" (for PHP), "plsql" (for PL/SQL), "python" (for Python), "rails" (for Rails), "robots" (for robots.txt), "ruby" (for Ruby), "smarty" (for Smarty), "sql" (for SQL), "text" (for Text), "xml" (for XML).
    • Line numbering can be enabled/disabled with the attribute "linenumbers". Possible values are: "off" for no line numbers, "normal" for normal line numbers and "fancy" for fancy line numbers (every nth line number highlighted). The start line number can be specified with the attribute "start", which implicitly enables normal line numbering. For fancy line numbering the interval for the highlighted line numbers can be specified with the attribute "fancy", which implicitly enables fancy line numbering.
    • If the source code between the tags contains a newline (e.g. immediatly after the opening tag), the highlighted source code will be displayed as a code block. Otherwise it will be displayed inline.

    Defaults:

    • Default highlighting mode for generic syntax highlighting tags: when no language attribute is specified, no syntax highlighting will be done.
    • Default line numbering: no line numbers.

    Examples:

    You typeYou get
    <code>foo = "bar";</code>Inline code with the default syntax highlighting mode.
    <code>
    foo = "bar";
    baz = "foz";
    </code>
    Code block with the default syntax highlighting mode.
    <code lang="rails" linenumbers="normal">
    foo = "bar";
    baz = "foz";
    </code>
    Code block with syntax highlighting for Rails source code
    and normal line numbers.
    <code language="rails" start="23" fancy="7">
    foo = "bar";
    baz = "foz";
    </code>
    Code block with syntax highlighting for Rails source code,
    line numbers starting from 23
    and highlighted line numbers every 7th line.
    <css>
    foo = "bar";
    baz = "foz";
    </css>
    Code block with syntax highlighting for CSS source code.
    <css start="23" fancy="7">
    foo = "bar";
    baz = "foz";
    <css>
    Code block with syntax highlighting for CSS source code,
    line numbers starting from 23
    and highlighted line numbers every 7th line.
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Typogrify.module brings the typographic refinements of Typogrify to Drupal.
    • Wraps ampersands (the $ldquo;&” character) with <span class=\"amp\">&</span>.
    • Prevents single words from wrapping onto their own line using Shaun Inman's Widont technique.
    • Converts straight quotation marks to typographer's quotation marks, using SmartyPants.
    • Converts multiple hyphens to en dashes and em dashes (according to your preferences), using SmartyPants.
    • Wraps multiple capital letters with <span class=\"caps\">CAPS</span>.
    • Wraps initial quotation marks with <span class=\"quo\"></span> or <span class=\"dquo\"></span>.
    • Adds a css style sheet that uses the <span> tags to substitute a showy ampersand in headlines, switch caps to small caps, and hang initial quotation marks.