Подсказки по редактированию

  • Подсветка синтаксиса исходного кода может быть активирована используя следующие теги:

    • Теги для подсветки синтаксиса: "<code>", "<blockcode>".
    • Language specific syntax highlighting tags: "<c>" for C source code, "<cpp>" for C++ source code, "<drupal5>" for Drupal 5 source code, "<drupal6>" for Drupal 6 source code, "<java>" for Java source code, "<javascript>" for Javascript source code, "<php>" for PHP source code, "<python>" for Python source code, "<ruby>" for Ruby source code.

    Опции и советы:

    • 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: "c" (for C), "cpp" (for C++), "drupal5" (for Drupal 5), "drupal6" (for Drupal 6), "java" (for Java), "javascript" (for Javascript), "php" (for PHP), "python" (for Python), "ruby" (for Ruby).
    • Поддерживаемые теги стилей: <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".

    Стандартно:

    • Режим подсветки по умолчанию для основных тегов подсветки синтаксиса: the default language used for syntax highlighting is "cpp".
    • Нумерация строк по умолчанию: нормальная нумерация строк.

    Пример:

    Вы пишетеВы получаете
    <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="javascript" linenumbers="normal">
    foo = "bar";
    baz = "foz";
    </code>
    Code block with syntax highlighting for Javascript source code
    and normal line numbers.
    <code language="javascript" start="23" fancy="7">
    foo = "bar";
    baz = "foz";
    </code>
    Code block with syntax highlighting for Javascript source code,
    line numbers starting from 23
    and highlighted line numbers every 7th line.
    <c>
    foo = "bar";
    baz = "foz";
    </c>
    Code block with syntax highlighting for C source code.
    <c start="23" fancy="7">
    foo = "bar";
    baz = "foz";
    <c>
    Code block with syntax highlighting for C source code,
    line numbers starting from 23
    and highlighted line numbers every 7th line.
  • Адреса страниц и электронной почты автоматически преобразуются в ссылки.
  • Строки и абзацы распознаются автоматически. Теги переноса строки <br />, абзаца <p> и закрытия абзаца </p> вставляются автоматически. Если абзацы не распознаны, просто добавьте пару пустых строк.
  • You may surround a section of text with "[collapse]" and "[/collapse]" to it into a collapsible section.

    You may use "[collapse]" tags within other "[collapse]" tags for nested collapsing sections.

    If you start with "[collapsed]" or "[collapse collapsed]", the section will default to a collapsed state.

    You may specify a title for the section in two ways. You may add a "title=" parameter to the opening tag, such as "[collapse title=<your title here>]". In this case, you should surround the title with double-quotes. If you need to include double-quotes in the title, use the html entity "&quot;". For example: '[collapse title="&quot;Once upon a time&quot;"]'. If a title is not specified in the "[collapse]" tag, the title will be taken from the first heading found inside the section. A heading is specified using the "<hX>" html tag, where X is a number from 1-6. The heading will be removed from the section in order to prevent duplication. If a title is not found using these two methods, a default title will be supplied.

    For advanced uses, you may also add a "class=" option to specify CSS classes to be added to the section. The CSS classes should be surrounded by double-quotes, and separated by spaces; e.g. '[collapse class="class1 class2"]'.

    You may combine these options in (almost) any order. The "collapsed" option should always come first; things will break if it comes after "title=" or "class=". If you need to have it come after the other options, you must specify it as 'collapsed="collapsed"'; e.g. '[collapse title="foo" collapsed="collapsed"]'.

    If you wish to put the string "[collapse" into the document, you will need to prefix it with a backslash ("\"). The first backslash before any instance of "[collapse" or "[/collapse" will be removed, all others will remain. Thus, if you want to display "[collapse stuff here", you should enter "\[collapse stuff here". If you wish to display "\[collapse other stuff", you will need to put in "\\[collapse other stuff". If you prefix three backslashes, two will be displayed, etc.

    If you prefer, you can use angle brackets ("<>") instead of straight brackets ("[]"). This module will find any instance of "<collapse" and change it to "[collapse" (also fixing the end of the tags and the closing tags).

    You may override the settings of the filter on an individual basis using a "[collapse options ...]" tag. The possible options now are 'form="form"' or 'form="noform"', and 'default_title="..."'. For example, '[collapse options form="noform" default_title="Click me!"]'. Only the first options tag will be looked at, and the settings apply for the entire text area, not just the "[collapse]" tags following the options tag. Note that surrounding <p> and <br> tags will be removed.

    This module supports some historical variants of the tag as well. The following are not recommended for any new text, but are left in place so that old uses still work. The "class=" option used to called "style=", and "style=" will be changed into "class=". If you don't put a double-quote immediately after "class=", everything up to the end of the tag or the string "title=" will be interpreted as the class string. Similarly, if you don't have a double-quote immediately following "title=", everything up to the end of the tag will be used as the title. Note that in this format, "style=" must precede "title=".