コメント |
@DIV
頼まれたので作りました。
スタイルは、@WIKI 内にあるものに追加。
.js は、@WIKI にアップロードして使うか、自分のサイトに置くか
http://www39.atwiki.jp/lightbox/pages/29.html(@WIKI での表示サンプルです)
@END
[[以下記述方法(vb をサンプルにしています)]]
@HTML
<PRE style='background-color:silver'>
#include_js(http://自分のアクセスできる場所/shCore.js)
#include_js(http://自分のアクセスできる場所/shBrushVb.js)
#html2(){{
<textarea name="code" class="vb">
Public Class Form1
Dim obj As New Microsoft.Office.Interop.Excel.ApplicationClass
Dim books As Microsoft.Office.Interop.Excel.Workbooks
Dim book As Microsoft.Office.Interop.Excel.Workbook
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
books = obj.Workbooks
book = books.Open("C:\user\book1.xls")
obj.Visible = True
End Sub
End Class
</textarea>
}}
#javascript(){{
dp.SyntaxHighlighter.ClipboardSwf = '/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
}}
</PRE>
↓SyntaxHighlighter で使用できる言語
<div id="lboxtable">
<table border="1">
<tbody>
<tr>
<th>
<pre>Language</pre>
</th>
<th><strong>Aliases</strong></th>
</tr>
<tr>
<td>C++</td>
<td><tt>cpp</tt>, <tt>c</tt>, <tt>c++</tt></td>
</tr>
<tr>
<td>C#</td>
<td><tt>c#</tt>, <tt>c-sharp</tt>, <tt>csharp</tt></td>
</tr>
<tr>
<td>CSS</td>
<td><tt>css</tt></td>
</tr>
<tr>
<td>Delphi</td>
<td><tt>delphi</tt>, <tt>pascal</tt></td>
</tr>
<tr>
<td>Java</td>
<td><tt>java</tt></td>
</tr>
<tr>
<td>Java Script</td>
<td><tt>js</tt>, <tt>jscript</tt>, <tt>javascript</tt></td>
</tr>
<tr>
<td>PHP</td>
<td><tt>php</tt></td>
</tr>
<tr>
<td>Python</td>
<td><tt>py</tt>, <tt>python</tt></td>
</tr>
<tr>
<td>Ruby</td>
<td><tt>rb</tt>, <tt>ruby</tt>, <tt>rails</tt>, <tt>ror</tt></td>
</tr>
<tr>
<td>Sql</td>
<td><tt>sql</tt></td>
</tr>
<tr>
<td>VB</td>
<td><tt>vb</tt>, <tt>vb.net</tt></td>
</tr>
<tr>
<td>XML/HTML</td>
<td><tt>xml</tt>, <tt>html</tt>, <tt>xhtml</tt>, <tt>xslt</tt></td>
</tr>
</tbody>
</table>
</div>
<STYLE type=text/css>
#lboxtable * {
font-family: 'MS Pゴシック';
font-size: 12px;
}
#lboxtable table {
border-collapse: collapse;
border-style: solid;
border-color: #000000;
border-width: 1px;
background-color: #FFFFFF;
}
#lboxtable td {
padding: 5px;
border-style: solid;
border-color: #000000;
border-width: 1px;
white-space: nowrap;
}
#lboxtable th {
padding: 5px;
border-style: solid;
border-color: #000000;
border-width: 1px;
background-color: silver;
white-space: nowrap;
}
</STYLE>
@HEND
|