Compose tips

Text Formats

Full HTML

  • Lines and paragraphs are automatically recognized. The <br /> line break, <p> paragraph and </p> close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple of blank lines.
  • You can caption images, videos, blockquotes, and so on. Examples:

    • <img src="" data-caption="This is a caption" />
    • <video src="" data-caption="The Drupal Dance" />
    • <blockquote data-caption="Dries Buytaert">Drupal is awesome!</blockquote>
    • <code data-caption="Hello world in JavaScript.">alert("Hello world!");</code>
  • Web page addresses and email addresses turn into links automatically.
  • Syntax highlighting of source code can be enabled with the following tags:

      Generic syntax highlighting tags: <code>, <blockcode>.
    • Language specific syntax highlighting tags:<bash> for Bash source code, <cpp> for C++ source code, <css> for CSS source code, <html5> for HTML5 source code, <java> for Java source code, <javascript> for Javascript source code, <php> for PHP source code, <sql> for SQL source code, <xml> for XML source code

    Options and tips:

    • The language for the generic syntax highlighting tags can be specified with one of the attribute(s): type, lang, language, class. The possible values are: "bash" (for Bash), "cpp" (for C++), "css" (for CSS), "html5" (for HTML5), "java" (for Java), "javascript" (for Javascript), "php" (for PHP), "sql" (for SQL), "xml" (for XML).
    • The supported tag styles are: <foo>, [foo].
    • 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.
    • A title can be added to a code block with the attribute "title".

    Defaults:

    • Default highlighting mode for generic syntax highlighting tags: when no language attribute is specified the code block won't be processed by the GeSHi filter.
    • Default line numbering: no line numbers.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs are automatically recognized. The <br /> line break, <p> paragraph and </p> close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple of blank lines.
  • Web page addresses and email addresses turn into links automatically.