「SyntaxHighlighter」のconfig②

2009 年 10 月 8 日 木曜日  【 カテゴリー: 便利なライブラリ,API


前回は「SyntaxHighlighter」のconfig設定の「bloggerMode」「clipboardSwf」「strings」についてみました。
今回は、残り「stripBrs」「toolbarItemWidth」「toolbarItemHeight」「tagName」についてみていきます。

stripBrs

If your software adds <br /> tags at the end of each line,
this option allows you to ignore those.

訳:
もしあなたのソフトウェアが各行の語尾に<bt />タグを加えているならば、
このオプションを設定すればこれらを無視します。

ブログツールなどによっては自動的に各行の語尾に<br />タグがつく場合があるので、この設定をすれば語尾の改行は無視するようです。

SyntaxHighlighter.config.stripBrs=true;

toolbarItemWidth

Width of an icon in the toolbar.
If you are customizing the toolbar
and need to change width of the icons,
you have to change toolbarItemWidth configuration property.

訳:
ツールバーのアイコンの横幅を設定します。
ツールバーをカスタマイズしてアイコンの幅を変える必要があるならば、
横プロパティの値を変更してください。

syntaxhighlighter_toolwidth

ツールバーのアイコンの横幅を設定します。

SyntaxHighlighter.config.toolbarItemWidth=100;

toolbarItemHeigh


Height of an icon in the toolbar.
訳:
ツールバーのアイコンの縦幅を設定します。

syntaxhighlighter_toolheight

ツールバーのアイコンの縦幅を設定します。

SyntaxHighlighter.config.toolbarItemHeight=50;

tagName


Facilitates using a different tag.
訳:
簡単に異なるタグを使用することができます。

コードをハイライトさせて表示させる範囲(SyntaxHighlighter要素) を示すタグはデフォルトでは「pre」になっていますが、これを変更します。

<head>
SyntaxHighlighter.config.tagName="code";
</head>
<code class="brush: js">
  【サンプルコード】
</code>

タグ:


にほんブログ村 IT技術ブログ Webサイト構築へ
にほんブログ村
【WEBサイト構築・プログラムブログ】
ランキング参加中!よろしければ「クリック」お願いします。
にほんブログ村 IT技術ブログ プログラム・プログラマへ
にほんブログ村
2009 年 10 月 8 日 木曜日  【 カテゴリー: 便利なライブラリ,API

コメント / トラックバック 2 件

  1. tachicoma77 より:

    おお、すごい詳細に調べてるやないですかー。
    いろいろ設定できるんですなー。また見させてもらいます(^^

  2. What’s SyntaxHighlighter Evolved?? | Web漬 より:

    [...] サイト構築日記 Posted on 木曜日, 5月 5th, 2011 Filed under:WordPress. Tags: SubscribeFollow responses [...]

コメントをどうぞ

※管理者による確認後に表示されます。表示までしばらくお待ちください。