SyntaxHighlighterの忘れるパラメータ

2010年 01月 09日

    備忘録

      Shortcode Parameters

      These are the parameters you can pass to the shortcode and what they do. For the booleans (i.e. on/off), pass true/1 or false/0.

      lang or language — The language syntax to highlight with. You can alternately just use that as the tag, such as [ [php]code[\/php]. Click here for a list of valid tags (under "aliases").

    • autolinks — Toggle automatic URL linking.
    • classname — Add an additional CSS class to the code box.
    • collapse — Toggle collapsing the code box by default, requiring a click to expand it. Good for large code posts.
    • firstline — An interger specifying what number the first line should be (for the line numbering).
    • gutter — Toggle the left-side line numbering.
    • highlight — A comma-sperated list of line numbers to highlight.
    • htmlscript — Toggle highlighting any extra HTML/XML. Good for when you're mixing HTML/XML with another language, such as having PHP inside an HTML web page. The above preview has it enabled for example. This only works with certain languages.
    • light — Toggle light mode which disables the gutter and toolbar all at once.
    • padlinenumbers — Controls line number padding. Valid values are false (no padding), true (automatic padding), or an integer (forced padding).
    • toolbar — Toggle the toolbar containing the helpful buttons.
    • wraplines — Toggle line wrapping.
    • Some example shortcodes:

      [php]your code here[/php]

      [css autolinks="false" classname="myclass" collapse="false" firstline="1" gutter="true" highlight="1,2,3" htmlscript="false" light="false" padlinenumbers="false" smarttabs="true" tabsize="4" toolbar="true"]your code here[/css]

      [code lang="js"]your code here[/code]

      [sourcecode language=”plain”]your code here[/sourcecode]

    ★☆★☆★☆ ナウでヤングなレンタルサーバー!ロリポップ! ☆★☆★☆★
    月額105円~容量最大30GB!WordpressやMovable Typeの簡単インストール付★

    Post a Comment