148 lines
No EOL
3.5 KiB
HTML
148 lines
No EOL
3.5 KiB
HTML
<html>
|
||
<head>
|
||
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
|
||
<script type="text/javascript" src="jquery.autosnippet-1.0.js"></script>
|
||
<link type="text/css" rel="stylesheet" href="css/SyntaxHighlighter.css"></link>
|
||
<script language="javascript" src="js/shCore.js"></script>
|
||
<script language="javascript" src="js/shBrushXml.js"></script>
|
||
<style>
|
||
|
||
.rec{
|
||
float:left;height:300px;width:500px;border:solid thin black;
|
||
}
|
||
|
||
</style>
|
||
</head>
|
||
|
||
<body>
|
||
|
||
|
||
|
||
<h1> <a href="http://spacebug.com/AutoSnippet_automatic_snippet_generator">AutoSnippet</a> JavaScript Library v1.0 </h1>
|
||
|
||
|
||
Dependencies – jquery http://jquery.com/ Optionally SyntaxHighlighter (both provided in this release)
|
||
|
||
<div >
|
||
<h3>Simple Example - the following code snippet is automatically generated: </h3>
|
||
</div>
|
||
|
||
usage:<br>
|
||
|
||
<code>
|
||
<div name='autosnippet:name_of_target:[yes/no -use Syntax Highlighter(default=no) ]'></div>
|
||
|
||
<div name='name_of_target'></div>
|
||
</code>
|
||
<div >
|
||
<h3>Simple Example - the following code snippet is automatically generated: </h3>
|
||
</div>
|
||
<div name="autosnippet:how_it_is_done1:yes" >
|
||
<div name="autosnippet:target" class="rec">
|
||
<table name="somename">
|
||
<tr>
|
||
<th>Just</th>
|
||
<th>write</th>
|
||
<th>the Example</th>
|
||
</tr>
|
||
<tr>
|
||
<td>and the</td>
|
||
<td>snippet</td>
|
||
<td>is automaticlly generated</td>
|
||
</tr>
|
||
|
||
</table>
|
||
|
||
</div>
|
||
|
||
<div name="target" class="rec"></div>
|
||
</div>
|
||
<div style="clear:both;">
|
||
<br>
|
||
<h3>Here is how it is done:</h3>
|
||
</div>
|
||
<div name="how_it_is_done1">
|
||
|
||
</div>
|
||
|
||
<div>
|
||
<h3>Example with Syntax Highlighter - the following code snippet is automatically generated with SyntaxHighlighter: </h3>
|
||
</div>
|
||
<div name="autosnippet:how_it_is_done2:yes" >
|
||
<div name="autosnippet:target1:yes" class="rec">
|
||
<table name="somename">
|
||
<tr>
|
||
<th>Just</th>
|
||
<th>write another</th>
|
||
<th>the Example</th>
|
||
</tr>
|
||
<tr>
|
||
<td>and the</td>
|
||
<td>snippet</td>
|
||
<td>is automaticlly generated</td>
|
||
</tr>
|
||
<tr>
|
||
<td>and the</td>
|
||
<td>snippet</td>
|
||
<td>is automaticlly generated</td>
|
||
</tr>
|
||
</table>
|
||
|
||
</div>
|
||
|
||
<div name="target1" class="rec"></div>
|
||
</div>
|
||
<div style="clear:both;">
|
||
<br>
|
||
<h3>Here is how it is done:</h3>
|
||
</div>
|
||
<div name="how_it_is_done2">
|
||
|
||
</div>
|
||
|
||
|
||
<div>
|
||
<h3>Example with Syntax Highlighter - snippet only: </h3>
|
||
</div>
|
||
|
||
<div name="autosnippet:how_it_is_done3:yes" >
|
||
<div name="target5" class="rec">
|
||
<div name="autosnippet:target5:yes" class="rec">
|
||
<table name="somename">
|
||
<tr>
|
||
<th>Just</th>
|
||
<th>write another</th>
|
||
<th>the Example</th>
|
||
</tr>
|
||
<tr>
|
||
<td>and the</td>
|
||
<td>snippet</td>
|
||
<td>is automaticlly generated</td>
|
||
</tr>
|
||
<tr>
|
||
<td>and the</td>
|
||
<td>snippet</td>
|
||
<td>is automaticlly generated</td>
|
||
</tr>
|
||
</table>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<div style="clear:both;">
|
||
|
||
<h3>Here is how it is done:</h3>
|
||
</div>
|
||
The key is to wrap the source div with the target div:
|
||
<div name="how_it_is_done3">
|
||
|
||
</div>
|
||
|
||
|
||
for more information contact Amir@spacebug.com
|
||
|
||
</body>
|
||
|
||
|
||
</html> |